Skip to content

Conversation

@afberg
Copy link
Contributor

@afberg afberg commented Nov 7, 2022

Ensures that users copying over API calls into the cli for the jobs/reset endpoint don't encounter errors.

Any user calling the reset cli with the new_settings property at the root level e.g.

databricks jobs reset --job-id JOB_ID --json { "new_settings": JOB_SETTINGS }

will no longer get an error. Only calls where the new_settings property is present at the root level are affected.

This PR aims to make the CLI and API more consistent without adding any breaking changes.

(This PR is a follow-up to #524)

@afberg afberg changed the title Jobs 9434 Allow JSON matching API endpoint for reset job Nov 7, 2022
@afberg afberg requested review from KoningJasper and removed request for KoningJasper November 7, 2022 14:41
@afberg afberg requested a review from pietern November 7, 2022 14:44
@afberg afberg marked this pull request as ready for review November 8, 2022 09:08
@codecov-commenter
Copy link

codecov-commenter commented Nov 8, 2022

Codecov Report

Base: 60.93% // Head: 75.76% // Increases project coverage by +14.83% 🎉

Coverage data is based on head (d3cce27) compared to base (d7a9987).
Patch coverage: 83.33% of modified lines in pull request are covered.

Additional details and impacted files
@@             Coverage Diff             @@
##             main     #582       +/-   ##
===========================================
+ Coverage   60.93%   75.76%   +14.83%     
===========================================
  Files          55       55               
  Lines        4669     4906      +237     
===========================================
+ Hits         2845     3717      +872     
+ Misses       1824     1189      -635     
Impacted Files Coverage Δ
databricks_cli/jobs/cli.py 96.07% <83.33%> (-0.55%) ⬇️
databricks_cli/unity_catalog/perms_cli.py 0.00% <0.00%> (ø)
databricks_cli/unity_catalog/catalog_cli.py 0.00% <0.00%> (ø)
databricks_cli/configure/provider.py 95.97% <0.00%> (+0.09%) ⬆️
databricks_cli/workspace/api.py 89.90% <0.00%> (+2.18%) ⬆️
databricks_cli/utils.py 93.75% <0.00%> (+3.64%) ⬆️
databricks_cli/unity_catalog/uc_service.py 27.51% <0.00%> (+27.51%) ⬆️
databricks_cli/cluster_policies/api.py 85.00% <0.00%> (+27.85%) ⬆️
databricks_cli/unity_catalog/api.py 47.97% <0.00%> (+47.97%) ⬆️
databricks_cli/unity_catalog/utils.py 73.07% <0.00%> (+73.07%) ⬆️
... and 5 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@afberg afberg requested a review from mengxr November 8, 2022 10:39
Copy link
Contributor

@pietern pietern left a comment

Choose a reason for hiding this comment

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

Minor comments. LGTM otherwise.

@afberg afberg requested review from pietern and removed request for mengxr November 9, 2022 13:51
Copy link
Contributor

@pietern pietern left a comment

Choose a reason for hiding this comment

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

@afberg Thanks!

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.

5 participants