Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
57 commits
Select commit Hold shift + click to select a range
5590258
bundle: record and read deployment state via DMS with server-generate…
shreyas-goenka Jul 23, 2026
da1ed9d
bundle: read DMS authority from last_successful_version_id
shreyas-goenka Jul 24, 2026
011c092
bundle: fix DMS deployment recording bugs found in review
shreyas-goenka Jul 27, 2026
38dc082
bundle: upload DMS operations asynchronously
shreyas-goenka Jul 27, 2026
19467dc
bundle: gate experimental.record_deployment_history behind an env var
shreyas-goenka Jul 27, 2026
22ec66a
bundle: rename the record_deployment_history escape hatch to force_allow
shreyas-goenka Jul 27, 2026
d7441e4
bundle: only record net-new deployments in DMS
shreyas-goenka Jul 27, 2026
026a521
bundle: fix lint errors in the operation queue test
shreyas-goenka Jul 27, 2026
481259b
bundle: keep the create action when coalescing DMS operations
shreyas-goenka Jul 27, 2026
309a1a4
bundle: drop the dms package comment
shreyas-goenka Jul 27, 2026
211aa94
bundle: resolve the DMS deployment ID from the workspace
shreyas-goenka Jul 27, 2026
4009eb4
bundle: address review of the DMS state PR
shreyas-goenka Jul 28, 2026
70741ae
bundle: record depends_on in the state uploaded to DMS
shreyas-goenka Jul 28, 2026
386a0b6
bundle: drop the DMS state overlay check
shreyas-goenka Jul 28, 2026
efe7320
bundle: gate DMS state on a state feature flag
shreyas-goenka Jul 28, 2026
92eac95
bundle: combine queued operations into a single Create action
shreyas-goenka Jul 29, 2026
96c0826
acceptance: set MSYS_NO_PATHCONV for the DMS tests
shreyas-goenka Jul 29, 2026
b2ef0e8
acceptance: scope MSYS_NO_PATHCONV to the get-status commands
shreyas-goenka Jul 29, 2026
30adb99
bundle: drop the locks in the operation queue's close
shreyas-goenka Jul 29, 2026
8f56ef6
bundle: record operation state without redacting it
shreyas-goenka Jul 29, 2026
329886f
bundle: drop the redaction TODO from the operation recorder
shreyas-goenka Jul 29, 2026
2818d11
bundle: revert the schema annotation and tighten CompleteVersion's guard
shreyas-goenka Jul 29, 2026
b84ae7c
bundle: gate record_deployment_history off again
shreyas-goenka Jul 29, 2026
daa69e2
bundle: stop the deploy when an operation upload fails
shreyas-goenka Jul 29, 2026
2c2e209
bundle: stop applying resources once an operation upload fails
shreyas-goenka Jul 29, 2026
9329441
testserver: create the DMS deployment record on the first version
shreyas-goenka Jul 29, 2026
38b6f54
bundle: simplify the concurrency test comment
shreyas-goenka Jul 29, 2026
4f45539
bundle: trim the operation recorder tests
shreyas-goenka Jul 29, 2026
2bf49fb
bundle: send recorded state as a JSON string
shreyas-goenka Aug 3, 2026
93e95a4
bundle: send previous_version_id and display_name when recording a ve…
shreyas-goenka Aug 4, 2026
9acbecc
bundle: fix recording a destroy
shreyas-goenka Aug 4, 2026
b34ed0a
bundle: record failed operations, and upload at most 2 at a time
shreyas-goenka Aug 4, 2026
b9ca9a3
bundle: report the recorded deployment in bundle summary
shreyas-goenka Aug 5, 2026
1a05f7a
bundle: record git, workspace and mode provenance with a version
shreyas-goenka Aug 5, 2026
c08abbd
bundle: stamp the deployment and version onto jobs and pipelines
shreyas-goenka Aug 5, 2026
41c41ee
bundle: raise operation upload workers back to 8
shreyas-goenka Aug 6, 2026
af8c851
bundle: spell out how to recover from the record-deployment-history e…
shreyas-goenka Aug 6, 2026
610b71f
bundle: add a bugbash guide for deployment history recording
shreyas-goenka Aug 6, 2026
d3bda0c
bundle: report the recorded deployment after a deploy
shreyas-goenka Aug 6, 2026
45c4ed2
bundle: link to the recorded deployment after a deploy
shreyas-goenka Aug 6, 2026
a8a5148
bundle: send the prior state when recording a failed operation
shreyas-goenka Aug 6, 2026
cf2d9cd
bundle: take the id and state of a failed operation from the same record
shreyas-goenka Aug 6, 2026
015af74
bundle: stop the deployment stamp from showing as drift
shreyas-goenka Aug 6, 2026
a49f16f
bundle: group what a version records into dms.Metadata
shreyas-goenka Aug 7, 2026
37a8b94
bundle: shorten the comment on the DMS upload-failure check
shreyas-goenka Aug 7, 2026
636c9cf
bundle: stamp the deployment before planning, and keep recording afte…
shreyas-goenka Aug 7, 2026
ff96ef0
bundle: decouple InitDeploymentHistory from InitIDs
shreyas-goenka Aug 7, 2026
e1d9bf6
Merge remote-tracking branch 'origin/main' into isaac/pr6052-fixes
shreyas-goenka Aug 7, 2026
89369d5
bundle: fold the display-name assertions into the first-deploy test
shreyas-goenka Aug 7, 2026
02c35fd
bundle: record DMS operations from the state writes
shreyas-goenka Aug 7, 2026
3f1c296
bundle: add DATABRICKS_BUNDLE_DMS to enable deployment history recording
shreyas-goenka Aug 7, 2026
0ddb805
bundle: skip a recorded resource that was never created, and prepare …
shreyas-goenka Aug 7, 2026
42d3cb4
bundle: run the acceptance suite with deployment history recording on
shreyas-goenka Aug 7, 2026
f49c0ce
bundle: extend the DMS acceptance run across bundle/resources
shreyas-goenka Aug 7, 2026
98c50c5
bundle: drop the deployment stamp from get responses in the DMS run
shreyas-goenka Aug 7, 2026
518434f
bundle: run the resources acceptance tests with deployment history on
shreyas-goenka Aug 7, 2026
9a0a800
bundle: run the whole bundle acceptance suite with deployment history on
shreyas-goenka Aug 7, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
13 changes: 12 additions & 1 deletion acceptance/bin/print_requests.py
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,17 @@ def filter_requests(requests, path_filters, include_get, should_sort, unique=Fal
return filtered_requests


def del_path(body, field):
"""Delete field from body. A dotted field descends into nested objects, e.g.
deployment.version_id removes only that key from the deployment block."""
*parents, leaf = field.split(".")
for name in parents:
body = body.get(name)
if not isinstance(body, dict):
return
body.pop(leaf, None)


def main():
parser = argparse.ArgumentParser()
parser.add_argument("path_filters", nargs="*", help="Path substring filters")
Expand Down Expand Up @@ -238,7 +249,7 @@ def main():
body = req.get("body")
if isinstance(body, dict):
for field in del_body_fields:
body.pop(field, None)
del_path(body, field)
for field in del_fields:
req.pop(field, None)
if args.verbose:
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

55 changes: 55 additions & 0 deletions acceptance/bundle/ai_runtime_task/test.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
# These normalize the deployment stamp recording adds to every job and pipeline, so a test
# asserts the same golden files whether or not recording is on - that is the point of the
# DMS run, rather than keeping a second copy of 600-odd output files. They are repeated per
# subtree rather than living in the parent because bundle/dms asserts the stamp itself and
# would inherit them.
#
# The stamp as a change the plan reports on its own. It shows up at whatever depth the
# enclosing object sits at, so the indent is matched loosely; the body lines are matched as
# `"key": value` pairs rather than `.*` so the match stops at the entry's own closing brace
# instead of running into its siblings. (Go's regexp is RE2, so the indent cannot be
# captured and back-referenced.)
[[Repls]]
Old = '(?m)^ *"deployment\.(deployment_id|version_id)": \{\n(?: *"[a-z_]+": .*\n)+ *\},\n'
New = ''

# Same entry when it is the last one in the object, so the comma is on the line before.
[[Repls]]
Old = '(?m),\n *"deployment\.(deployment_id|version_id)": \{\n(?: *"[a-z_]+": .*\n)+ *\}\n'
New = "\n"

# When the stamp is the only entry, the whole "changes" object exists because of recording.
# The trailing-comma form comes first: the rule after it would match the same text and
# leave the comma on the previous line dangling.
[[Repls]]
Old = '(?m),\n *"changes": \{\n *"deployment\.(deployment_id|version_id)": \{\n(?: *"[a-z_]+": .*\n)+ *\}\n *\}\n'
New = "\n"

[[Repls]]
Old = '(?m)^ *"changes": \{\n *"deployment\.(deployment_id|version_id)": \{\n(?: *"[a-z_]+": .*\n)+ *\}\n *\},?\n'
New = ''

# The stamp inside a serialized deployment block, as printed by `jobs get` / `pipelines get`
# and in state dumps. Both keys always sit alongside "kind" and "metadata_file_path", so
# each pattern anchors on one of those - that keeps it from matching an unrelated field
# named deployment_id elsewhere in the output.
#
# Order puts these after the root's numeric rules (Order = 10), which have by then turned
# the id into [NUMID].
[[Repls]]
Old = '(?m)^ *"deployment_id": "\[NUMID\]",\n( *"kind": "BUNDLE")'
New = '${1}'
Order = 20

[[Repls]]
# The value is required to be non-empty: a terraform state dump carries
# "version_id": "" for a job it never stamped, and that line is not ours to drop.
Old = '(?m)(^ *"metadata_file_path": [^\n]*),\n *"version_id": "[^"\n]+"\n'
New = "$1\n"
Order = 20

# Same two keys in gron.py's flattened form, where each is its own line.
[[Repls]]
Old = '(?m)^json.*\.deployment\.(deployment_id|version_id) = [^\n]*\n'
New = ''
Order = 20
1 change: 1 addition & 0 deletions acceptance/bundle/apps/app_yaml/out.test.toml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions acceptance/bundle/apps/compute_size/out.test.toml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions acceptance/bundle/apps/delete_deleting/out.test.toml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions acceptance/bundle/apps/git_source/out.test.toml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions acceptance/bundle/apps/job_permissions/out.test.toml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions acceptance/bundle/apps/value_from_warning/out.test.toml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions acceptance/bundle/artifacts/build_and_files/out.test.toml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions acceptance/bundle/artifacts/glob_exact_whl/out.test.toml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions acceptance/bundle/artifacts/globs_in_files/out.test.toml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions acceptance/bundle/artifacts/globs_invalid/out.test.toml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions acceptance/bundle/artifacts/issue_3109/out.test.toml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions acceptance/bundle/artifacts/nil_artifacts/out.test.toml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions acceptance/bundle/artifacts/shell/bash/out.test.toml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions acceptance/bundle/artifacts/shell/basic/out.test.toml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions acceptance/bundle/artifacts/shell/cmd/out.test.toml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions acceptance/bundle/artifacts/shell/default/out.test.toml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions acceptance/bundle/artifacts/shell/err-bash/out.test.toml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions acceptance/bundle/artifacts/shell/err-sh/out.test.toml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions acceptance/bundle/artifacts/shell/invalid/out.test.toml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions acceptance/bundle/artifacts/shell/sh/out.test.toml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

56 changes: 56 additions & 0 deletions acceptance/bundle/artifacts/test.toml
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,59 @@ Response.Body = '''
"spark_version": "13.3.x-scala2.12"
}
'''

# These normalize the deployment stamp recording adds to every job and pipeline, so a test
# asserts the same golden files whether or not recording is on - that is the point of the
# DMS run, rather than keeping a second copy of 600-odd output files. They are repeated per
# subtree rather than living in the parent because bundle/dms asserts the stamp itself and
# would inherit them.
#
# The stamp as a change the plan reports on its own. It shows up at whatever depth the
# enclosing object sits at, so the indent is matched loosely; the body lines are matched as
# `"key": value` pairs rather than `.*` so the match stops at the entry's own closing brace
# instead of running into its siblings. (Go's regexp is RE2, so the indent cannot be
# captured and back-referenced.)
[[Repls]]
Old = '(?m)^ *"deployment\.(deployment_id|version_id)": \{\n(?: *"[a-z_]+": .*\n)+ *\},\n'
New = ''

# Same entry when it is the last one in the object, so the comma is on the line before.
[[Repls]]
Old = '(?m),\n *"deployment\.(deployment_id|version_id)": \{\n(?: *"[a-z_]+": .*\n)+ *\}\n'
New = "\n"

# When the stamp is the only entry, the whole "changes" object exists because of recording.
# The trailing-comma form comes first: the rule after it would match the same text and
# leave the comma on the previous line dangling.
[[Repls]]
Old = '(?m),\n *"changes": \{\n *"deployment\.(deployment_id|version_id)": \{\n(?: *"[a-z_]+": .*\n)+ *\}\n *\}\n'
New = "\n"

[[Repls]]
Old = '(?m)^ *"changes": \{\n *"deployment\.(deployment_id|version_id)": \{\n(?: *"[a-z_]+": .*\n)+ *\}\n *\},?\n'
New = ''

# The stamp inside a serialized deployment block, as printed by `jobs get` / `pipelines get`
# and in state dumps. Both keys always sit alongside "kind" and "metadata_file_path", so
# each pattern anchors on one of those - that keeps it from matching an unrelated field
# named deployment_id elsewhere in the output.
#
# Order puts these after the root's numeric rules (Order = 10), which have by then turned
# the id into [NUMID].
[[Repls]]
Old = '(?m)^ *"deployment_id": "\[NUMID\]",\n( *"kind": "BUNDLE")'
New = '${1}'
Order = 20

[[Repls]]
# The value is required to be non-empty: a terraform state dump carries
# "version_id": "" for a job it never stamped, and that line is not ours to drop.
Old = '(?m)(^ *"metadata_file_path": [^\n]*),\n *"version_id": "[^"\n]+"\n'
New = "$1\n"
Order = 20

# Same two keys in gron.py's flattened form, where each is its own line.
[[Repls]]
Old = '(?m)^json.*\.deployment\.(deployment_id|version_id) = [^\n]*\n'
New = ''
Order = 20

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions acceptance/bundle/artifacts/whl_dbfs/out.test.toml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions acceptance/bundle/artifacts/whl_dynamic/out.test.toml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions acceptance/bundle/artifacts/whl_explicit/out.test.toml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions acceptance/bundle/artifacts/whl_implicit/out.test.toml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions acceptance/bundle/artifacts/whl_multiple/out.test.toml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions acceptance/bundle/artifacts/whl_no_cleanup/out.test.toml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading