-
Notifications
You must be signed in to change notification settings - Fork 64
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
Allow overriding compute for non-development mode targets #1899
Allow overriding compute for non-development mode targets #1899
Conversation
} | ||
if v := env.Get(ctx, "DATABRICKS_CLUSTER_ID"); v != "" { | ||
b.Config.Bundle.ClusterId = v | ||
} | ||
|
||
if b.Config.Bundle.ClusterId == "" { | ||
return nil | ||
return diags | ||
} | ||
|
||
r := b.Config.Resources | ||
for i := range r.Jobs { | ||
overrideJobCompute(r.Jobs[i], b.Config.Bundle.ClusterId) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unrelated note: this also overrides serverless notebook tasks (without environment_key
).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Functionality LGTM, approving to unblock.
Please take a look at:
- The flag name in the PR summary doesn't exist (it's
--cluster-id
) - Wording in the new log talks about "compute"
If integration tests don't run automatically, an authorized user can run them manually by following the instructions below: Trigger: Inputs:
Checks will be approved automatically on success. |
Test Details: go/deco-tests/12243557365 |
@lennartkats-db I triggered integration tests (see the comment, it doesn't auto-trigger from forks). But then I tried it out and found the issue above, so I disabled auto-merge. |
@denik FYI, no review needed. |
…1994) ## Changes We should show a warning when using a cluster override with 'mode: production'. Right now, we inadvertently show an error for this state. This is a followup based on #1899 (comment).
Bundles: * Allow overriding compute for non-development mode targets ([#1899](#1899)). * Avoid panic if Config.Workspace.CurrentUser.User is not set ([#1993](#1993)). * Show an error when using a cluster override with 'mode: production' ([#1994](#1994)). Internal: API Changes: * Added `databricks account federation-policy` command group. * Added `databricks account service-principal-federation-policy` command group. * Added `databricks aibi-dashboard-embedding-access-policy delete` command. * Added `databricks aibi-dashboard-embedding-approved-domains delete` command. OpenAPI commit a6a317df8327c9b1e5cb59a03a42ffa2aabeef6d (2024-12-16) Dependency updates: * Upgrade TF provider to 1.62.0 ([#2030](#2030)). * Upgrade Go SDK to 0.54.0 ([#2029](#2029)). * Bump TF codegen dependencies to latest ([#1961](#1961)). * Bump golang.org/x/term from 0.26.0 to 0.27.0 ([#1983](#1983)). * Bump golang.org/x/sync from 0.9.0 to 0.10.0 ([#1984](#1984)). * Bump github.com/databricks/databricks-sdk-go from 0.52.0 to 0.53.0 ([#1985](#1985)). * Bump golang.org/x/crypto from 0.24.0 to 0.31.0 ([#2006](#2006)). * Bump golang.org/x/crypto from 0.30.0 to 0.31.0 in /bundle/internal/tf/codegen ([#2005](#2005)).
Bundles: * Allow overriding compute for non-development mode targets ([#1899](#1899)). * Show an error when using a cluster override with 'mode: production' ([#1994](#1994)). API Changes: * Added `databricks account federation-policy` command group. * Added `databricks account service-principal-federation-policy` command group. * Added `databricks aibi-dashboard-embedding-access-policy delete` command. * Added `databricks aibi-dashboard-embedding-approved-domains delete` command. OpenAPI commit a6a317df8327c9b1e5cb59a03a42ffa2aabeef6d (2024-12-16) Dependency updates: * Upgrade TF provider to 1.62.0 ([#2030](#2030)). * Upgrade Go SDK to 0.54.0 ([#2029](#2029)). * Bump TF codegen dependencies to latest ([#1961](#1961)). * Bump golang.org/x/term from 0.26.0 to 0.27.0 ([#1983](#1983)). * Bump golang.org/x/sync from 0.9.0 to 0.10.0 ([#1984](#1984)). * Bump github.com/databricks/databricks-sdk-go from 0.52.0 to 0.53.0 ([#1985](#1985)). * Bump golang.org/x/crypto from 0.24.0 to 0.31.0 ([#2006](#2006)). * Bump golang.org/x/crypto from 0.30.0 to 0.31.0 in /bundle/internal/tf/codegen ([#2005](#2005)).
Changes
Allow overriding compute for non-development targets. We previously had a restriction in place where
--cluster-id
was only allowed for targets that usemode: development
. The intention was to prevent mistakes, but this was overly restrictive.Tests
Updated unit tests.