bundle: validate recorded state size during bundle validate - #6083
Closed
shreyas-goenka wants to merge 2 commits into
Closed
bundle: validate recorded state size during bundle validate#6083shreyas-goenka wants to merge 2 commits into
shreyas-goenka wants to merge 2 commits into
Conversation
The deployment metadata service rejects a resource state over 64 KiB (MAX_STATE_BYTES) with InvalidArgument. Hitting that mid-apply fails a deploy after some resources have already been created, so check it up front instead. The state checked here is what the deploy path uploads: the state prepared from config, serialized with sensitive fields redacted. It is a pure config transform, so it needs no workspace request and belongs in FastValidate, which runs for both `bundle validate` and `bundle deploy`. The check is scoped to direct-engine deployments that opted into experimental.record_deployment_history, since no other deployment uploads this state. FastValidate now takes the resolved engine rather than reading bundle.engine, which reports terraform when DATABRICKS_BUNDLE_ENGINE selects it. Co-authored-by: Isaac
"Split it up" means a different edit per resource type, so name the split that applies: multiple jobs with fewer tasks, multiple alerts with fewer conditions, multiple pipelines with fewer libraries. file_path on alerts (and dashboards/genie spaces) is deliberately not suggested. LoadDBAlertFiles inlines the file into AlertV2 during initialize, so the recorded state is byte-identical whether the body came from file_path or from inline YAML; recommending it would send users on a refactor that does not reduce the size. Co-authored-by: Isaac
Contributor
|
An authorized user can trigger integration tests manually by following the instructions below: Trigger: Inputs:
Checks will be approved automatically on success. |
shreyas-goenka
marked this pull request as ready for review
July 28, 2026 14:08
Contributor
Approval status: pending
|
Contributor
Author
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.
Changes
This is a best effort and slightly in-perfect validation to error early if we detect users will have really large state sizes. Rather than failing at runtime.