Repository navigation
[2.0] Fixes #37164: Keep GlossaryTermApprovedTaggingIT terms out of the approval workflow - #37989
Conversation
…l workflow on 2.0 The 2.0 hand port of #37164 (#37689) created the test's glossaries without main's status-fixture prefix, and 2.0 had no bootstrap exclusion for it. Each created term therefore queued a GlossaryTermApprovalWorkflow run; with no reviewers that run ends in SetGlossaryTermStatusToApproved. When it landed after the test's status-only deprecate PATCH, the term flipped back to Approved and the "deprecated term is rejected" assertions got no 400. Port main's mechanism: GlossaryTestFactory.STATUS_TEST_GLOSSARY_PREFIX / createForStatusTests, and TestSuiteBootstrap excluding that prefix from the GlossaryTermApprovalWorkflow trigger before any test runs. The test's glossaries use the prefix. Test-only; no server change.
❌ PR checklist incompleteThis PR cannot be merged until the following are addressed on its linked issue:
The fields live on the linked issue in the Shipping project (open the issue → right sidebar → Projects). After you set them, re-run this check (or push a commit) — issue/project changes do not re-trigger it automatically. Maintainers can bypass this check by adding the |
Code Review ✅ Approved 🟡 Medium riskThe test bootstrap filters status-fixture glossaries from approval workflows, changing integration-test behavior and potentially bypassing workflow coverage for those fixtures. Test-only fix that keeps VerificationRules No rules evaluated Functional validation Not enabledAuto-approval Not enabledFor more verification details, comment OptionsDisplay: compact → Showing compact verification results. Comment with these commands to change the behavior for this request:
Was this helpful? React with 👍 / 👎 | Powered by Gitar — free for open source |
Describe your changes:
Fixes #37164
GlossaryTermApprovedTaggingITfails on most 2.0 PRs (14 of 15 parallel-lane jobs across #37964, #37962, #37913, #37898 and #37815, on all three engines). Every failing case uses a Deprecated term: the test tags an asset with it, expects a 400 and gets none.Cause. The 2.0 hand port of #37164 (#37689) created the test's glossaries with plain names. On main they use
GlossaryTestFactory.createForStatusTests, whose prefix the test bootstrap excludes fromGlossaryTermApprovalWorkflow; that exclusion came with #34541, which is not on 2.0. On 2.0 every term the test creates therefore queues an approval-workflow run, and for a glossary with no reviewers that run ends inSetGlossaryTermStatusToApproved. The test deprecates the term straight after creating it, with a status-only PATCH that the trigger ignores. When the queued Created run lands after that PATCH, it sets the term back to Approved, so the tag write is accepted.Fix (test-only). Port main's mechanism unchanged:
GlossaryTestFactory.STATUS_TEST_GLOSSARY_PREFIX/createForStatusTestsTestSuiteBootstrap.excludeGlossaryStatusFixturesFromApproval(): before any test runs, adds aglossaryTermexclusion filter for that prefix to theGlossaryTermApprovalWorkflowtrigger. No other 2.0 test creates glossaries with this prefix.GlossaryTermApprovedTaggingITcreates its glossaries with the prefix, and its class Javadoc no longer claims the workflow leaves a deprecated term alone.2.1 already has all of this from the clean cherry-pick (#37688). No server code changes.
Type of change:
Tests
Local, MySQL + Elasticsearch, 2.0 + this branch:
GlossaryTermCreated → CheckGlossaryTermHasReviewers → SetGlossaryTermStatusToApprovedand ended Approved. This reproduces the bug.GlossaryTermApprovedTaggingIT19,GlossaryTermInheritedReviewerApprovalIT9,GlossaryTermMoveApprovalIT4: Tests run: 32, Failures: 0, Errors: 0. The last two also useGlossaryTermApprovalWorkflowand confirm the bootstrap change leaves the real approval flows unaffected.Checklist:
Fixes <issue-number>: <short explanation>🤖 Generated with Claude Code
The behavior appears safe, but the required
finalmodifiers must be added before merging.Findings
Summary
This test-only change keeps status fixtures out of automatic glossary approval.
Reviews (1) · Last reviewed commit: "test(it): keep GlossaryTermApprovedTaggi..." · Reviewed by Greptile