Reject and ignore deployment_id/version_id on jobs and pipelines#5441
Merged
Conversation
Collaborator
Integration test reportCommit: f4405cc
24 interesting tests: 15 SKIP, 7 KNOWN, 2 flaky
Top 25 slowest tests (at least 2 minutes):
|
1675d50 to
bb53a67
Compare
bb53a67 to
b3361d1
Compare
b3361d1 to
5c00e17
Compare
5c00e17 to
d755193
Compare
d755193 to
83b7584
Compare
83b7584 to
cf70c2b
Compare
hide_from_plan annotation; Hide deployment_id and version_id
cf70c2b to
8b823a7
Compare
8b823a7 to
25d0d6b
Compare
hide_from_plan annotation; Hide deployment_id and version_iddeployment_id and version_id on a job/pipeline deployment block are set by the CLI to track the bundle deployment in the Deployment Metadata Service. They are not user-configurable, so this change: - Errors at validation time if either is set in bundle configuration (new validate.ValidateDeploymentFields mutator). - Adds deployment.version_id to ignore_local_changes / ignore_remote_changes for jobs and pipelines in the direct engine. version_id is set on every deploy, so this keeps its churn from driving an update or showing as drift on its own; it is still written whenever the resource is updated for another reason (DoUpdate sends the full config). deployment_id is left out: it is stable, so a change to it is shown and applied normally. - Removes deployment_id/version_id from the generated JSON schema. Co-authored-by: Isaac
25d0d6b to
f4405cc
Compare
pietern
approved these changes
Jun 16, 2026
denik
approved these changes
Jun 16, 2026
denik
left a comment
Contributor
There was a problem hiding this comment.
Why does PR says "direct:"? we'll reject those on TF as well, right?
Contributor
Author
We expect version_id to be set for direct jobs / pipelines. Not for terraform ones. Remove the prefix though since we perform validation regardless. |
Collaborator
Integration test reportCommit: bce2de8
559 interesting tests: 487 MISS, 55 FAIL, 8 KNOWN, 3 PANIC, 3 flaky, 2 SKIP, 1 RECOVERED
Top 50 slowest tests (at least 2 minutes):
|
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.
Why
deployment_idandversion_idon a job/pipelinedeploymentblock are set by the CLI to identify the bundle deployment and its version in the Deployment Metadata Service. They are not user-configurable.Benefits:
version_idchanges on every deploy; ignoring it as a local/remote change keeps that churn from driving spurious updates or showing as drift.