-
Notifications
You must be signed in to change notification settings - Fork 76
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
Add support for dashboards in deployment bind/unbind commands #2516
Conversation
f77bc94
to
6034d67
Compare
DASHBOARD_DISPLAY_NAME="test dashboard $(uuid)" | ||
if [ -z "$CLOUD_ENV" ]; then | ||
DASHBOARD_DISPLAY_NAME="test dashboard 6260d50f-e8ff-4905-8f28-812345678903" # use hard-coded uuid when running locally | ||
export TEST_DEFAULT_WAREHOUSE_ID="warehouse-1234" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there any downside for hardcoding these in acceptance_test.go if CLOUD_ENV is "" and they are not set already?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the only thing i can think of - this style keeps this local to the test and does not encourage variables that are too use-case specific to be used in unrelated tests
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we fix Dashboard recreation on bind before we proceed with this? I would consider recreation of dashboards on bind + subsequent deployment to be a correctness issue.
We are not able to fix the Dashboard re-creation, as there is not API to move a dashboard to a different location without changing its ID. Instead, we will introduce a warning check for end users that a Dashboard would be re-created on deployment |
6034d67
to
7445444
Compare
…during deployment
Changes
FindResourceByConfigKey
to return dashboard resourcesWhy
This PR adds support for dashboard resources in deployment operations, enabling users to:
databricks bundle deployment bind <mydashboard_key> <mydashboard_id>
databricks bundle deployment unbind <mydashboard_key>
Where:
mydashboard_key
is a resource key defined in the bundle's .yml filemydashboard_id
references an existing dashboard in the Databricks workspaceThese capabilities allow for more flexible resource management of dashboards within bundles.
Tests
Added two new acceptance tests that tests bind and unbind methods together with bundle deployment and destruction, including a case of dashboard recreation