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

[BUG] Bundles Force Acquire Lock is broken #32

Closed
stikkireddy opened this issue Sep 1, 2023 · 8 comments
Closed

[BUG] Bundles Force Acquire Lock is broken #32

stikkireddy opened this issue Sep 1, 2023 · 8 comments
Assignees
Labels
bug Something isn't working good first issue Good for newcomers
Milestone

Comments

@stikkireddy
Copy link
Collaborator

stikkireddy commented Sep 1, 2023

Describe the bug
bf deploy --force-acquire-lock isnt mapping to the right bundles arg.

Fix

"""CLI deploy the bundle."""
deploy_args = ["deploy", "-e", get_bundles_project_env()]
if force_acquire_lock is True:
deploy_args.append("--force-lock")
exec_command(get_valid_bundle_cli(bundle_cli), "bundle", deploy_args)

To Reproduce

Bundle is called --force-deploy and force not --force-lock

Deploy bundle

Usage:
  databricks bundle deploy [flags]

Flags:
  -c, --compute-id string   Override compute in the deployment with the given compute ID.
      --force               Force-override Git branch validation.
      --force-deploy        Force acquisition of deployment lock.
  -h, --help                help for deploy

Global Flags:
  -e, --environment string       bundle environment to use (if applicable)
      --log-file file            file to write logs to (default stderr)
      --log-format type          log output format (text or json) (default text)
      --log-level format         log level (default disabled)
  -o, --output type              output type: text or json (default text)
  -p, --profile string           ~/.databrickscfg profile
      --progress-format format   format for progress logs (append, inplace, json) (default default)
      --var strings              set values for variables defined in bundle config. Example: --var="foo=bar"
@stikkireddy stikkireddy added bug Something isn't working good first issue Good for newcomers labels Sep 1, 2023
@stikkireddy stikkireddy changed the title [BUG] Please add your bug title here [BUG] Bundles Force Acquire Lock is broken Sep 1, 2023
@asingamaneni asingamaneni added this to the v1.0.0 milestone Sep 8, 2023
@nachatz
Copy link

nachatz commented Sep 18, 2023

I can pick this up if still available. How should this be handled considering recent Databricks CLI versions resolve this naming convention? Shall we include a version check to dynamically determine the argument?

i.e. if version is below 0.203.x use force-deploy, if greater use force-lock?

@stikkireddy
Copy link
Collaborator Author

@asingamaneni should we support older versions of CLI as we pin a brickflow version to a specific version of the CLI?

@newfront
Copy link
Collaborator

It's probably worth supporting N versions back and handling the internal mapping for the bundle locking.

@nachatz the idea of splitting the command based on the local version of the cli is a good idea.

@asingamaneni
Copy link
Collaborator

@asingamaneni should we support older versions of CLI as we pin a brickflow version to a specific version of the CLI?

I think a range would be better as we are not exactly pinning the version right -

databricks-sdk = ">=0.1.8 <1.0.0"
?

@stikkireddy
Copy link
Collaborator Author

@asingamaneni referring to the databricks golang cli not the sdk.

@asingamaneni
Copy link
Collaborator

@nachatz would you like to pick this up? We will want to support older versions for the next release and deprecate it later in the future versions.

@nachatz
Copy link

nachatz commented Nov 11, 2023

@nachatz would you like to pick this up? We will want to support older versions for the next release and deprecate it later in the future versions.

@asingamaneni Looks like this was already picked up: #51 . Happy to contribute if I misinterpreted

@asingamaneni
Copy link
Collaborator

Yes, this is handled in the pr. Thanks for the help!

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

No branches or pull requests

4 participants