Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

lakeview publish --embed-credentials default option configured to true whereas should be false #1002

Open
pratikk-databricks opened this issue Jul 31, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@pratikk-databricks
Copy link

Describe the issue

the databricks lakeview publish command has a flag --embed-credentials which is a boolean flag. So if the --embed-credentials is present then it should be True or else False.
Although in the current version, if we do not specify the --embed-credentials, by default the dashboard is published with embed-credentials true. So there is no way to specify it as false with the current cli command

Steps to reproduce the behavior

Please list the steps required to reproduce the issue, for example:

  1. Run databricks lakeview publish <Dashboard ID> --warehouse id <warehouse_id>
    The reports gets published with embedded credentials

  2. Run databricks lakeview publish <Dashboard ID> --warehouse id <warehouse_id> --embed-credentials
    The reports gets published with embedded credentials

  3. Run databricks lakeview publish <Dashboard ID> --warehouse id <warehouse_id> --embed-credentials false
    does not work since --embed-credentials is a boolean flag

Expected Behavior

The command without the --embed-credentials flag should publish the dashboard with in "Don't embeded Credentials' mode:
databricks lakeview publish --warehouse id <warehouse_id>

Actual Behavior

  1. Run databricks lakeview publish <Dashboard ID> --warehouse id <warehouse_id>
    The reports gets published with embedded credentials

  2. Run databricks lakeview publish <Dashboard ID> --warehouse id <warehouse_id> --embed-credentials
    The reports gets published with embedded credentials

No option to publish without embedded credentials mode

OS and CLI version

Windows, v0.218.1

Is this a regression?

Did this work in a previous version of the CLI? If so, which versions did you try?
Not tried in a previous version

Debug Logs

Nothing much in debug logs as there is no error.

@andrewnester andrewnester added the bug Something isn't working label Jul 31, 2024
@andrewnester
Copy link
Contributor

Hi! The design principal for CLI is to mirror / follow API behaviour

For 1 - Works as expected, since this is a default value for an API hence the behaviour (https://docs.databricks.com/api/workspace/lakeview/publish#embed_credentials)

For 2 - Works as expected

For 3 - you can call it databricks lakeview publish <ID> --embed-credentials=false but indeed there's an issue there - false value seems to be dropped from the request.

This is an issue on OpenAPI / Go SDK side, so I move the issue to that repo

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants