bundle: avoid num_workers with policy defaults - #6230
Conversation
|
An authorized user can trigger integration tests manually by following the instructions below: Trigger: Inputs:
Checks will be approved automatically on success. |
Approval status: pending
|
|
@andrewnester could you please advise on how I can sign this CLA? 😊 Online I've read that "When you submit a pull request, a CLA bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately", but this hasn't happened. |
|
@paddy-devan please reach out to dabs-feedback@databricks.com and we'll take it from there |
Changes
num_workers: 0initialization when cluster policy defaults are enabled.autoscalevalues during direct-engine drift detection for task, for-each-task, and shared job clusters.Why
Fixes #3125.
Related precedent: #2755 and databricks/terraform-provider-databricks#4643.
The CLI initializes an omitted job-cluster size to zero to preserve the existing Terraform-provider compatibility behavior. That remains unchanged unless
apply_policy_default_valuesis enabled. In that case, a cluster policy may supplyautoscale, and also sendingnum_workersproduces conflicting sizing fields.This follows the existing precedent that policy-materialized values should not be treated as user-configured drift. The change is limited to the policy-default path; explicit
num_workers, explicitautoscale, and configurations with policy defaults disabled retain their current behavior.Tests
go test ./bundle/config/mutator/resourcemutator -run TestInitializeNumWorkers -count=1go test ./bundle/direct/dresources -count=1