Repository navigation
fix(infra): the drift ignore list needed a rule, not a longer list of sightings - #370
Merged
Merged
Conversation
… sightings Second real drift run (41283281935) after #369. `dev` and `prod` went GREEN — the `-detailed-exitcode` false positives are gone, which was the main thing #369 fixed. `state-backend` and `core` still failed, and the classifier is why that was useful rather than opaque: it reported exactly which attributes it ignored and which it did not. state-backend ignored aws_kms_key.state [tags] real aws_s3_bucket.state [server_side_encryption_configuration, versioning] core real aws_iam_role.ci_tf_drift [inline_policy] All three are the SAME class as the ones #369 already ignored — an attribute the provider deprecated in favour of a separate resource and now computes from it. Run 1's truncated text output had simply hidden them behind the `# ... has changed` headline. So the list stops being a record of sightings and becomes a rule: ignore an attribute on a type when a SIBLING RESOURCE owns it. What makes that safe rather than convenient is that nothing hides — turn bucket versioning off in the console and `aws_s3_bucket_versioning` drifts; the deprecated `aws_s3_bucket.versioning` mirror saying so too is duplicate noise, not the signal. That rule is also the boundary, and it is the reason the entries stay type-scoped. `policy` is ignored on `aws_s3_bucket` and nowhere else, because a real change to an `aws_iam_role_policy` document must stay loud. `managed_policy_arns` moved out of the ignore-anywhere list for the same reason. With the rule stated, the `aws_s3_bucket` family is listed in full rather than one sighting at a time — every one of those is owned by an `aws_s3_bucket_*` resource — so this does not need a third round. 42 assertions now, and the two entries run 2 surfaced are mutation-checked: removing `aws_s3_bucket:versioning` and `aws_iam_role:inline_policy` turns the suite red on "deprecated sibling mirrors are NOT drift". Also corrected the test file's own header, which still claimed three helpers and that §14.2's prod-scoped apply role was unbuilt — it has been since #363/#364 — and now states the opposite risk the classifier carries: an over-broad ignore entry retires drift detection while leaving the workflow in the tree. One process note, since it cost a redo: `reset --hard` on uncommitted work loses it, and the repo's own memory says to check `git status` before any git operation here. I did not, and rewrote these two edits. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
athvin
force-pushed
the
bm/infra-drift-siblings
branch
from
November 1, 2026 07:16
8b034d8 to
62298af
Compare
Contributor
terraform plan
|
athvin
added a commit
that referenced
this pull request
Nov 5, 2026
`drift (dev)` reports real drift on `module.eks.aws_eks_cluster.this [platform_version]`, which AWS moved from `eks.14` to `eks.17` when it patched the control plane. We set it nowhere — `grep platform_version infra/terraform/` finds nothing — so there is no configuration for it to drift FROM. Left alone it fails the daily schedule after every AWS patch, forever, which is the fastest way to teach everyone to ignore a red drift job. A THIRD rule rather than a third entry in `IGNORE_ON_TYPE`. That list is the sibling-resource rule specifically — an attribute a sibling resource owns, and whose drift the sibling reports itself — and stretching it to cover this would make it mean "whatever we are tired of seeing". #370's lesson was that the ignore list needs a rule, not a longer list of sightings, and it applies here. `IGNORE_READONLY` states what qualifies: the attribute appears only in the provider's Attribute Reference, never its Argument Reference, and `grep` finds it nowhere in infra/terraform/. Both checked for this entry rather than assumed. Two fixtures, because the test file's own warning is that an over-broad entry silently retires drift detection while leaving the workflow green: - a read-only attribute alone is NOT drift (exit 0), and - a SETTABLE attribute beside it on the SAME type IS drift (exit 1), named as `[version]` and not swallowed with its read-only neighbour. The second is the one that keeps the rule honest: without it, "ignore platform_version on aws_eks_cluster" could be widened to the whole type and nobody would notice EKS drift detection had been switched off. Observed failing before being trusted: removing the rule fails both new assertions, and the boundary case keeps passing — which is the direction that proves it is asserting an absence rather than nothing. 45 passed, 0 failed. Co-authored-by: bmoore813 <[email protected]> Co-authored-by: Claude Opus 5 (1M context) <[email protected]>
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.
Second real drift run (41283281935) after #369.
devandprodwent green — the-detailed-exitcodefalse positives are gone, which was the main thing #369 fixed.state-backendandcorestill failed, and the classifier is why that was useful rather than opaque: it reported exactly which attributes it ignored and which it didn't.state-backendaws_kms_key.state[tags]state-backendaws_s3_bucket.state[server_side_encryption_configuration, versioning]coreaws_iam_role.ci_tf_drift[inline_policy]All three are the same class #369 already ignored — an attribute the provider deprecated in favour of a separate resource and now computes from it. Run 1's truncated text output had hidden them behind the
# … has changedheadline.So the list becomes a rule
What makes that safe rather than merely convenient is that nothing hides: turn bucket versioning off in the console and
aws_s3_bucket_versioningdrifts. The deprecatedaws_s3_bucket.versioningmirror saying so as well is duplicate noise, not the signal.That rule is also the boundary, and it's why entries stay type-scoped:
policyis ignored onaws_s3_bucketand nowhere else — a real change to anaws_iam_role_policydocument must stay loud.managed_policy_arnsmoved out of the ignore-anywhere list for the same reason.With the rule stated, the
aws_s3_bucketfamily is listed in full rather than one sighting at a time — every one of those is owned by anaws_s3_bucket_*resource — so this shouldn't need a third round.Verification
42 assertions. The two entries run 2 surfaced are mutation-checked: removing
aws_s3_bucket:versioningandaws_iam_role:inline_policyturns the suite red on "deprecated sibling mirrors are NOT drift", and the file was restored byte-identical (cmp) with the suite re-confirmed green.Also corrected the test file's own header, which still claimed three helpers and that §14.2's prod-scoped apply role was unbuilt — it has been since #363/#364. It now states the opposite risk the classifier carries: an over-broad ignore entry retires drift detection while leaving the workflow in the tree, which is why both directions are asserted.
Expected after merge: all four stacks green, with
state-backendandcorelisting their mirrors under "ignored as provider artifacts". I'll dispatch and report.One process note, since it cost a redo: I ran
reset --hardover uncommitted work and lost these two edits. This repo's own memory says to checkgit statusbefore any git operation here; I didn't.🤖 Generated with Claude Code