Skip to content

AstraDBDatabaseAdmin, unwarranted warning about options #63

@sl-at-ibm

Description

@sl-at-ibm

I think that these two method signatures -one calling the other- are structured so that one gets the "cannot use options" warning no matter what they do, which seems a unintended effect.

In other words, even when calling admin.dropKeyspace("ba") I get the warning (confirmed in code I'm running now).

Something like refactoring with a third private method actually doing the request, called in turn by the two public method signatures, would prevent this.

Additional thought 1

The issue is moreso that the warning itself is wrong–some of the options (e.g. ifExists or client-side options) are valid. It should be doing more specific checks for if invalid options exist. (Kavin)

Additional thought 2

Also looking at the body I see that, for certain values of ifExists, the client gets involved with checking for existence of the keyspace.

Weren't such methods originally meant to be a thin transparent layer just relaying a call "as-is" to the API (devops in this case)? Is this 'responsibility mixing' intentional?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions