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

redundant job_id information #908

Closed
hoiting opened this issue Oct 23, 2023 · 3 comments
Closed

redundant job_id information #908

hoiting opened this issue Oct 23, 2023 · 3 comments
Assignees
Labels
CLI CLI related issues Enhancement New feature or request

Comments

@hoiting
Copy link

hoiting commented Oct 23, 2023

It seems like to trigger a job, one can do
databricks jobs run_now <job_id>
however, if one also wants to provide a json, the job_id info needs to be provided again in --json or the command will fail

databricks jobs run_now <job_id> --json '{"python_params": [...]}' <-- this will fail

databricks jobs run_now <job_id> --json '{"job_id": <job_id>. "python_params": [...]}' <-- this will run fine

The same information is provided twice. It is a bit inconvenient and unclear which one gets used in the end.

@shreyas-goenka shreyas-goenka added Enhancement New feature or request CLI CLI related issues labels Oct 24, 2023
@andrewnester
Copy link
Contributor

The command can either be run as databricks jobs run_now <job_id> or as databricks jobs run_now --json '{"job_id": <job_id>. "python_params": [...]} (note, positional argument is not needed)

@andrewnester andrewnester self-assigned this Oct 24, 2023
@hoiting
Copy link
Author

hoiting commented Oct 26, 2023

Thanks. This behaviour is not consistent through out the cli though. For example, databricks serving-endpoints update-permissions <endpoint_id> --json <json_payload>, it seems like one has to provide both for it to run. Simply having the id in json but not in the positional argument won't work.

@andrewnester
Copy link
Contributor

CLI commands behaviour was largely improved in this PR to avoid inconsistencies #878 and released in latest version of CLI.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLI CLI related issues Enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants