Repository navigation
refactor(ipa): single-source the legacy long-running operation list - #1447
Merged
Merged
Conversation
Move the 17 legacy operationIds out of the merge tagger's hardcoded map into legacyLongRunningOperations.json inside the IPA ruleset package, where the upcoming 202-based IPA-132 LRO rules and the npm package consumers can read it directly. The Go map is now generated from that JSON via go generate, and a unit test asserts the two never drift. Tagging behavior is unchanged. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
julius-jogela
force-pushed
the
feat-ipa-132-shared-legacy-lro-list
branch
from
August 24, 2026 12:51
8cd8538 to
c7c5aad
Compare
julius-jogela
marked this pull request as ready for review
August 24, 2026 12:58
julius-jogela
requested review from
andreaangiolillo,
chrysanthi-m,
drinkbird,
maks-m-mongo-leaf,
matt-condon,
saisundar and
wtrocki
August 24, 2026 12:58
| builder.WriteString("//\n") | ||
| builder.WriteString("// Generated by this command:\n") | ||
| builder.WriteString("//\n") | ||
| builder.WriteString("//\tgo run ./gen\n\n") |
Collaborator
There was a problem hiding this comment.
Q: Does this command run automatically as part of the build, or do we need to run it manually?
(If manual, it would be better if we can add it to somewhere in the contributing.md)
Contributor
Author
There was a problem hiding this comment.
It's manual, go generate doesn't run as part of the build. There's a unit test that compares the generated map against the JSON so the two can't drift. Also added a line to CONTRIBUTING.md for clarity.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
yelizhenden-mdb
approved these changes
Aug 24, 2026
2 tasks done
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.
Proposed changes
This PR moves the hardcoded list of 17 legacy long-running operationIds out of the foascli merge tagger into a single shared file, so the upcoming IPA-132 LRO rules can consume the same list the tagger uses. Tagging behavior is unchanged.
Jira ticket: CLOUDP-438234
Why
The IPA-132 LRO rules will select on the declared 202 response so they also work on the raw per-service specs in MMS, where
x-xgen-long-running-operationdoes not exist (it is only added at the merge step). Those rules need the same legacy exclusions the tagger applies, without maintaining the list twice.How
tools/spectral/ipa/rulesets/functions/utils/legacyLongRunningOperations.json— the single source of truth. Lives inside the ruleset package so it ships to npm consumers.go generate ./internal/cli/merge, generator underinternal/cli/merge/gen).go:embedcannot cross thetools/climodule boundary and the released foascli binary cannot read repo files at runtime, so generation is the mechanism.Testing
go build ./...,go vet,go test -race -cover ./internal...— all pass; the existingtagLongRunningOperationstests are unchanged and green.golangci-lint run(v2.10.1, the CI pin): 0 issues.go generateverified idempotent; regenerated output is byte-identical to the previous hand-written map.Checklist