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

Fixed databricks_job update from instance pool to regular node type #2549

Merged
merged 1 commit into from
Aug 2, 2023

Conversation

marekbrysa
Copy link
Contributor

Changes

When a job cluster was updated from instance pool to regular, the computed driver_instance_pool_id was still being sent, which then caused failure of the cluster to start with error in the UI "Worker must use a pool if driver uses a pool".

This resets the driver_instance_pool_id if instance_pool_id is not set.

Also I noticed there was a function FixInstancePoolChangeIfAny that was only used on databricks_cluster. Looking at #850, I believe it's also relevant for jobs clusters, so applying it too.

Tests

Tested updating a jobs cluster from regular to pool and back.

  • make test run locally
  • relevant change in docs/ folder
  • covered with integration tests in internal/acceptance
  • relevant acceptance tests are passing
  • using Go SDK

@marekbrysa marekbrysa requested review from a team as code owners August 2, 2023 12:24
@marekbrysa marekbrysa requested a review from mgyucht August 2, 2023 12:24
@codecov-commenter
Copy link

Codecov Report

Merging #2549 (af1f2b0) into master (2873d96) will increase coverage by 0.00%.
Report is 3 commits behind head on master.
The diff coverage is 83.33%.

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #2549   +/-   ##
=======================================
  Coverage   88.18%   88.19%           
=======================================
  Files         145      145           
  Lines       12013    12050   +37     
=======================================
+ Hits        10594    10627   +33     
- Misses        933      935    +2     
- Partials      486      488    +2     
Files Changed Coverage Δ
clusters/clusters_api.go 85.30% <71.42%> (-0.41%) ⬇️
clusters/resource_cluster.go 85.58% <100.00%> (+0.48%) ⬆️
jobs/resource_job.go 91.66% <100.00%> (+0.08%) ⬆️

... and 1 file with indirect coverage changes

Copy link
Contributor

@mgyucht mgyucht left a comment

Choose a reason for hiding this comment

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

Nice! Any chance you can do a manual test of this to verify?

@marekbrysa
Copy link
Contributor Author

@mgyucht yeah, I already did, it seems to work: "Tested updating a jobs cluster from regular to pool and back."

@mgyucht mgyucht added this pull request to the merge queue Aug 2, 2023
Merged via the queue into databricks:master with commit 82a2be9 Aug 2, 2023
@mgyucht mgyucht mentioned this pull request Aug 8, 2023
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.

3 participants