-
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 experiments in deployment bind/unbind commands #2434
Conversation
) | ||
|
||
func TestBindExperimentToExistingExperiment(t *testing.T) { |
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.
I know that existing tests for bind are integration tests but have you explored making new ones acceptance tests instead?
0566adb
to
509408c
Compare
509408c
to
333a7cf
Compare
… windows environments
…placements in windows environments
Deployment complete! | ||
|
||
=== Read the pre-defined experiment: { | ||
"name": "/Users/[USERNAME]/test-experiment[UUID]", |
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.
This is not related to this PR but this highlights that experiment API does not respect /Workspace prefix in name when they are created
BUNDLE_NAME_SUFFIX=$(uuid) | ||
export BUNDLE_NAME_SUFFIX | ||
|
||
# double slash at the start prevents Windows to apply replacements to the path |
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.
Does this replacement setting comes from some other test? Any chance we can just disable this replacement for this test?
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.
I discovered this behavior by writing this test and seeing our Windows environments failing on it.
There is a variety of env variables that we could try to disable the replacements: https://stackoverflow.com/questions/7250130/how-to-stop-mingw-and-msys-from-mangling-path-names-given-at-the-command-line, but they are reported to causing other issues unexpectedly, so I propose to not dive into this until there are more cases that cause trouble.
Changes
FindResourceByConfigKey
to return experiment resourcesWhy
This PR adds support for experiment resources in deployment operations, enabling users to:
databricks bundle deployment bind <myexperiment_key> <experiment_id>
databricks bundle deployment unbind <myexperiment_key>
Where:
myexperiment_key
is a resource key defined in the bundle's .yml fileexperiment_id
references an existing experiment in the Databricks workspaceThese capabilities allow for more flexible resource management of experiments within bundles.
Tests
Added a new acceptance test that tests bind and unbind methods together with bundle deployment and destruction.