Skip to content

Commit ff7ba4e

Browse files
authored
Fix pipeline allow_duplicate_names never converges (#6076)
## Changes Declare pipeline `allow_duplicate_names` as `input_only` in `ignore_remote_changes`, next to the existing `run_as` entry. Adds a `no_drift` invariant config covering it. ## Why The field is only carried by `CreatePipeline`/`EditPipeline` and is never returned by GET, so remote always reads back `false`. With `allow_duplicate_names: true`, every plan after a deploy reported a perpetual update (`old: true, new: true` — config unchanged, phantom remote drift). It's in `RemoteType` via the embedded `CreatePipeline`, so the automatic `missing_in_remote` suppression doesn't apply. `dry_run` is request-only in the same way, but `EditPipeline` has no `DryRun` field, so it needs its own fix and is out of scope here. ## Tests New `pipeline_allow_duplicate_names.yml.tmpl` invariant config: fails on `main`, passes with the fix. Also confirmed on dogfood — perpetual `1 to change` across three deploys before the fix, control pipeline without the field clean.
1 parent f496c89 commit ff7ba4e

9 files changed

Lines changed: 22 additions & 0 deletions

File tree

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Fixed a pipeline with `allow_duplicate_names: true` never converging on the direct engine: the field is only accepted on create/update and is never returned by the pipelines GET API, so every subsequent `bundle plan` reported the pipeline as a perpetual update.
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
bundle:
2+
name: test-bundle-$UNIQUE_NAME
3+
4+
resources:
5+
pipelines:
6+
foo:
7+
name: test-pipeline-$UNIQUE_NAME
8+
allow_duplicate_names: true
9+
libraries:
10+
- file:
11+
path: pipeline.py

acceptance/bundle/invariant/continue_293/out.test.toml

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

acceptance/bundle/invariant/delete_idempotent/out.test.toml

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

acceptance/bundle/invariant/destroy_idempotent/out.test.toml

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

acceptance/bundle/invariant/migrate/out.test.toml

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

acceptance/bundle/invariant/no_drift/out.test.toml

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

acceptance/bundle/invariant/test.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ EnvMatrix.INPUT_CONFIG = [
4949
"model_with_permissions.yml.tmpl",
5050
"model_serving_endpoint.yml.tmpl",
5151
"pipeline.yml.tmpl",
52+
"pipeline_allow_duplicate_names.yml.tmpl",
5253
"pipeline_apply_policy_default_values.yml.tmpl",
5354
"pipeline_config_dots.yml.tmpl",
5455
"postgres_branch.yml.tmpl",

bundle/direct/dresources/resources.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -180,6 +180,10 @@ resources:
180180
reason: "!drop"
181181
- field: run_as
182182
reason: input_only
183+
# Carried by CreatePipeline/EditPipeline but never returned by GET, so remote
184+
# always reads back false and a config value of true never converges.
185+
- field: allow_duplicate_names
186+
reason: input_only
183187

184188
ignore_local_changes:
185189
- field: deployment.version_id

0 commit comments

Comments
 (0)