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

Add support for volumes in deployment bind/unbind commands #2527

Merged
merged 5 commits into from
Mar 21, 2025

Conversation

anton-107
Copy link
Contributor

@anton-107 anton-107 commented Mar 19, 2025

Changes

  1. Changed FindResourceByConfigKey to return volume resources
  2. Implemented Exists method on Volume resource

Why

This PR adds support for volume resources in deployment operations, enabling users to:

  • Bind experiments using databricks bundle deployment bind <myvolume_key> <myvolume_full_name>
  • Unbind experiments using databricks bundle deployment unbind <myvolume_key>

Where:

  • myvolume_key is a resource key defined in the bundle's .yml file
  • myvolume_full_name references an existing volume in the Databricks workspace using its fully qualified (3-level) name

These capabilities allow for more flexible resource management of volumes within bundles.

Tests

Added a new acceptance test that tests bind and unbind methods together with bundle deployment and destruction.

@anton-107 anton-107 temporarily deployed to test-trigger-is March 19, 2025 16:14 — with GitHub Actions Inactive
@anton-107 anton-107 force-pushed the anton-107/bind-volumes branch from 6248f93 to 8ea8834 Compare March 20, 2025 09:30
@anton-107 anton-107 temporarily deployed to test-trigger-is March 20, 2025 09:30 — with GitHub Actions Inactive
@anton-107 anton-107 marked this pull request as ready for review March 20, 2025 09:34
@anton-107 anton-107 force-pushed the anton-107/bind-volumes branch from 8ea8834 to 7b9719c Compare March 20, 2025 16:24
@anton-107 anton-107 temporarily deployed to test-trigger-is March 20, 2025 16:24 — with GitHub Actions Inactive
@anton-107 anton-107 temporarily deployed to test-trigger-is March 21, 2025 10:12 — with GitHub Actions Inactive
@anton-107 anton-107 temporarily deployed to test-trigger-is March 21, 2025 10:14 — with GitHub Actions Inactive

trace $CLI bundle deployment unbind volume1

trace $CLI bundle destroy --auto-approve
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should also be part of trap, right?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it is part of the test - in the next command we are verifying that an unbound volume is not destroyed when a bundle is

@anton-107 anton-107 force-pushed the anton-107/bind-volumes branch from a896715 to 2a487ba Compare March 21, 2025 10:27
@anton-107 anton-107 temporarily deployed to test-trigger-is March 21, 2025 10:28 — with GitHub Actions Inactive
@anton-107 anton-107 added this pull request to the merge queue Mar 21, 2025
Merged via the queue into main with commit 78e1b9c Mar 21, 2025
9 checks passed
@anton-107 anton-107 deleted the anton-107/bind-volumes branch March 21, 2025 11:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants