Skip to content

Encourage the use of root_path in production to ensure single deployment#1712

Merged
lennartkats-db merged 12 commits into
databricks:mainfrom
lennartkats-db:cp-encourage-root-path
Jan 13, 2025
Merged

Encourage the use of root_path in production to ensure single deployment#1712
lennartkats-db merged 12 commits into
databricks:mainfrom
lennartkats-db:cp-encourage-root-path

Conversation

@lennartkats-db

Copy link
Copy Markdown
Contributor

Changes

This updates mode: production to allow root_path to indicate uniqueness. Historically, we required run_as for this, which isn't actually very effective for that purpose. run_as also had the problem that it doesn't work for pipelines.

This is a cherry-pick from #1387

@lennartkats-db lennartkats-db requested a review from pietern August 28, 2024 07:43
Comment thread bundle/config/mutator/cleanup_targets.go Outdated
Comment thread bundle/config/mutator/process_target_mode.go Outdated
Comment thread bundle/config/mutator/process_target_mode.go
Comment thread bundle/config/mutator/process_target_mode.go Outdated
Comment thread bundle/config/mutator/process_target_mode_test.go Outdated
Comment thread bundle/config/mutator/process_target_mode.go
lennartkats-db and others added 2 commits August 29, 2024 16:49
Co-authored-by: Pieter Noordhuis <pcnoordhuis@gmail.com>
Comment thread bundle/config/mutator/cleanup_targets.go Outdated
Comment thread bundle/config/mutator/process_target_mode.go
Comment thread bundle/config/mutator/process_target_mode.go Outdated
Comment thread bundle/config/mutator/process_target_mode.go
Comment thread bundle/config/mutator/select_target.go
@lennartkats-db lennartkats-db force-pushed the cp-encourage-root-path branch 2 times, most recently from 742210c to 3973c50 Compare October 12, 2024 10:01
@lennartkats-db

Copy link
Copy Markdown
Contributor Author

@pietern @andrewnester could you take another look at this PR? The remaining thread should be resolved: #1712 (comment)

Comment thread bundle/config/bundle.go Outdated
Comment thread bundle/config/mutator/process_target_mode.go Outdated
// report an error for them.
return diag.Warningf("target with 'mode: production' should " + advice)
}
return diag.Errorf("target with 'mode: production' must " + advice)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

For follow-up: the advice should be a multi-line string in the Detail field to render nicely. As is, it is shown as a single (wrapped) line. The warning case will light up in all cases where mode: production is used and the root path is not specified.

Also, this doc page should be updated https://docs.databricks.com/en/dev-tools/bundles/deployment-modes.html#production-mode as well and linked from the warning to explain why the warning is shown while users haven't changed anything.

Comment thread bundle/config/mutator/process_target_mode.go Outdated
@lennartkats-db lennartkats-db removed the request for review from andrewnester January 10, 2025 17:45
@lennartkats-db lennartkats-db added this pull request to the merge queue Jan 11, 2025
@github-merge-queue github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Jan 11, 2025
@github-actions

Copy link
Copy Markdown
Contributor

An authorized user can trigger integration tests manually by following the instructions below:

Trigger:
go/deco-tests-run/cli

Inputs:

  • PR number: 1712
  • Commit SHA: 9098320c63350f44d07c86da3c071331c2556bf3

Checks will be approved automatically on success.

@lennartkats-db lennartkats-db added this pull request to the merge queue Jan 13, 2025
Merged via the queue into databricks:main with commit 3e40a0c Jan 13, 2025
@lennartkats-db lennartkats-db deleted the cp-encourage-root-path branch January 13, 2025 12:24
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.

2 participants