feat: add cost_optimization_features to dbtcloud_job, fix CI/Merge SAO and deferral bugs (closes #664)#670
Open
feat: add cost_optimization_features to dbtcloud_job, fix CI/Merge SAO and deferral bugs (closes #664)#670
Conversation
…O and deferral bugs (closes #664) - Adds cost_optimization_features Set attribute as the preferred way to enable State-Aware Orchestration (SAO), replacing deprecated force_node_selection - Fixes CI/Merge jobs erroring with SAO validation (405 error) by skipping SAO validation for CI and Merge job types - Fixes CI/Merge jobs losing deferring_environment_id by preserving the value from the API response during Read - Adds 5 new acceptance tests Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
The dbt Cloud API uses force_node_selection (bool) under the hood, not a cost_optimization_features array. Bridge in both directions: - Write: cost_optimization_features=["node_selection"] -> force_node_selection=true - Read: force_node_selection=true -> cost_optimization_features=["node_selection"] Fixes inconsistent result after apply in TestAccDbtCloudJobCostOptimizationFeatures and TestAccDbtCloudJobCIWithCostOptimizationFeatures. Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
…AO enforcement - Fix Update path: use plan.ForceNodeSelection.IsNull() instead of job.ForceNodeSelection == nil for bridge condition, so clearing cost_optimization_features correctly sends force_node_selection=false - Fix test step 2: account has account-level SAO enforcement so force_node_selection cannot be disabled; replace the clear step with a name-update step that verifies cost_optimization_features is stable Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
cost_optimization_featuresSet attribute as the preferred replacement for deprecatedforce_node_selectionto enable State-Aware Orchestration (SAO). The attribute bridges toforce_node_selectionunder the hood since the dbt Cloud API usesforce_node_selection: bool— setting["node_selection"]enables SAO, and the provider readsforce_node_selectionback to keep state consistentdeferring_environment_idafter applycost_optimization_featuresis not tested as the acceptance test account has account-level SAO enforcement that prevents disablingforce_node_selection)Closes #664
🤖 Generated with Claude Code