Repository navigation
Tag bundle deploy uploads as deployment copies - #7893
ilyakuz-db wants to merge 5 commits into
Conversation
|
Commit: Regression test reportSelected 10 changed tests (limit=20, 0 not selected) 17 tests: regression=15 unreleased=0 coverage=2 failing=0
TestAccept/bundle/apps/app_yaml/DMS=: branch ✅ | main (1ea5591) ❌ | latest (v1.27.0) ❌main (1ea5591): latest (v1.27.0): same output as main (1ea5591) TestAccept/bundle/apps/app_yaml/DMS=true: branch ✅ | main (1ea5591) ❌ | latest (v1.27.0) ❌main (1ea5591): latest (v1.27.0): same output as main (1ea5591) TestAccept/bundle/deploy/readplan/whl-upload/DMS=: branch ✅ | main (1ea5591) ❌ | latest (v1.27.0) ❌main (1ea5591): latest (v1.27.0): TestAccept/bundle/libraries/outside_of_bundle_root/DMS=: branch ✅ | main (1ea5591) ❌ | latest (v1.27.0) ❌main (1ea5591): latest (v1.27.0): same output as main (1ea5591) TestAccept/bundle/libraries/outside_of_bundle_root/DMS=true: branch ✅ | main (1ea5591) ❌ | latest (v1.27.0) ❌main (1ea5591): latest (v1.27.0): same output as main (1ea5591) TestAccept/bundle/resources/jobs/request-summary: branch ✅ | main (1ea5591) ❌ | latest (v1.27.0) ❌main (1ea5591): latest (v1.27.0): same output as main (1ea5591) TestAccept/bundle/sync/bundle_file_origin/DMS=: branch ✅ | main (1ea5591) ❌ | latest (v1.27.0) ❌main (1ea5591): latest (v1.27.0): same output as main (1ea5591) TestAccept/bundle/sync/bundle_file_origin/DMS=true: branch ✅ | main (1ea5591) ❌ | latest (v1.27.0) ❌main (1ea5591): latest (v1.27.0): same output as main (1ea5591) TestAccept/bundle/upload/internal_server_error/DMS=: branch ✅ | main (1ea5591) ❌ | latest (v1.27.0) ❌main (1ea5591): latest (v1.27.0): same output as main (1ea5591) TestAccept/bundle/upload/internal_server_error/DMS=true: branch ✅ | main (1ea5591) ❌ | latest (v1.27.0) ❌main (1ea5591): latest (v1.27.0): same output as main (1ea5591) TestAccept/bundle/upload/timeout/DMS=: branch ✅ | main (1ea5591) ❌ | latest (v1.27.0) ❌main (1ea5591): latest (v1.27.0): same output as main (1ea5591) TestAccept/bundle/upload/timeout/DMS=true: branch ✅ | main (1ea5591) ❌ | latest (v1.27.0) ❌main (1ea5591): latest (v1.27.0): same output as main (1ea5591) TestAccept/bundle/user_agent/simple/DMS=: branch ✅ | main (1ea5591) ❌ | latest (v1.27.0) ❌main (1ea5591): latest (v1.27.0): TestAccept/bundle/validate/sync_patterns/DMS=: branch ✅ | main (1ea5591) ❌ | latest (v1.27.0) ❌main (1ea5591): latest (v1.27.0): same output as main (1ea5591) TestAccept/bundle/validate/sync_patterns/DMS=true: branch ✅ | main (1ea5591) ❌ | latest (v1.27.0) ❌main (1ea5591): latest (v1.27.0): |
Changes
Files that bundle commands upload to the workspace now carry
bundleFileOrigin=DEPLOYMENT_COPYon/api/2.0/workspace-files/import-file.libs/filer:NewWorkspaceFilesClientForBundleDeployreturns a client that appends the parameter on every upload.libs/sync:SyncOptions.DeploymentCopypicks that client.bundle/deploy/files:GetSyncOptionssets it, sobundle deployandbundle synctag the synced files. It is not set when the CLI runs in the workspace andfile_pathis the sync root itself, since those files are the bundle's source.bundle/libraries: libraries uploaded to the workspace are tagged too.State files (
deploy.lock,deployment.json,metadata.json,resources.json) anddatabricks sync SRC DSTare not tagged.Why
With
workspace.file_pathpointing outside.bundle, a deployeddatabricks.ymlcan make its folder look like a bundle you author in the workspace. The tag lets the workspace tell deployment copies from sources. It is a query parameter, so workspaces that don't know it ignore it. Every uploaded file is tagged, not onlydatabricks.yml, so the origin survives a later rename.Incremental sync only re-uploads changed files, so files deployed before this change stay untagged until they change or a full sync runs.
Tests
New acceptance test
bundle/sync/bundle_file_originrecords the upload requests of deploy, bundle sync and plain sync; unit tests cover the URL and the write-onto-source check. Ran the bundle, cmd and workspace acceptance tests locally and regenerated the goldens that record uploads.6fbb5ec27be6eaRIGHT-SIZED: adds the origin signal where the deploy writes files6fbb5ece25f76c(latest)e25f76c(latest)e25f76c(latest)✅ success · ⏳ pending ·⚠️ warning · ❌ failed · ➖ n/a
This pull request and its description were written by Isaac.