Skip to content

[2.0] Fixes #37164: Keep GlossaryTermApprovedTaggingIT terms out of the approval workflow - #37989

Merged
yan-3005 merged 1 commit into
2.0from
fix/2.0-glossary-approved-tagging-it-race
Nov 17, 2026
Merged

yan-3005 merged 1 commit into
2.0from
fix/2.0-glossary-approved-tagging-it-race

Conversation

@yan-3005

@yan-3005 yan-3005 commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor

Describe your changes:

Fixes #37164

GlossaryTermApprovedTaggingIT fails 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 from GlossaryTermApprovalWorkflow; 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 in SetGlossaryTermStatusToApproved. 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 / createForStatusTests
  • TestSuiteBootstrap.excludeGlossaryStatusFixturesFromApproval(): before any test runs, adds a glossaryTerm exclusion filter for that prefix to the GlossaryTermApprovalWorkflow trigger. No other 2.0 test creates glossaries with this prefix.
  • GlossaryTermApprovedTaggingIT creates 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:

  • Bug fix

Tests

Local, MySQL + Elasticsearch, 2.0 + this branch:

  • Probe test (temporary, not committed). It creates and immediately deprecates one term in a plain glossary and one in a prefixed glossary:
    • Plain glossary: the term ran GlossaryTermCreated → CheckGlossaryTermHasReviewers → SetGlossaryTermStatusToApproved and ended Approved. This reproduces the bug.
    • Prefixed glossary: the term stayed Deprecated. Its two trigger instances finished in about 7 ms with 0 workflow stages, so the filter stopped them.
  • GlossaryTermApprovedTaggingIT 19, GlossaryTermInheritedReviewerApprovalIT 9, GlossaryTermMoveApprovalIT 4: Tests run: 32, Failures: 0, Errors: 0. The last two also use GlossaryTermApprovalWorkflow and confirm the bootstrap change leaves the real approval flows unaffected.

Checklist:

  • I have read the CONTRIBUTING document.
  • My PR title is Fixes <issue-number>: <short explanation>
  • I have commented on my code, particularly in hard-to-understand areas.
  • I have added a test that covers the exact scenario we are fixing.

🤖 Generated with Claude Code

RetriggerView in GreptileConfidence Score: 4/5

The behavior appears safe, but the required final modifiers must be added before merging.

Findings

  1. P2 Required modifiers are missing ▶

Summary

This test-only change keeps status fixtures out of automatic glossary approval.

  • Status-test glossaries stay out of automatic term approval.

Reviews (1) · Last reviewed commit: "test(it): keep GlossaryTermApprovedTaggi..." · Reviewed by Greptile

…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.
@github-actions

Copy link
Copy Markdown
Contributor

❌ PR checklist incomplete

This PR cannot be merged until the following are addressed on its linked issue:

  • No GitHub issue is linked. Link an issue in the Development section of the PR (or add Fixes #12345 to the description). For a same-org cross-repo issue, add Fixes open-metadata/<repo>#123 to the description.

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 skip-pr-checks label.

@gitar-bot

gitar-bot Bot commented Nov 17, 2026 •

Copy link
Copy Markdown
Code Review ✅ Approved 🟡 Medium risk

The 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 GlossaryTermApprovedTaggingIT glossary terms out of the GlossaryTermApprovalWorkflow by adding a trigger exclusion filter for the status-test glossary prefix in TestSuiteBootstrap. No issues found.

Verification

Rules No rules evaluated

Functional validation Not enabled

Set up

Auto-approval Not enabled

Set up

For more verification details, comment gitar display:verbose.

Options

Display: compact → Showing compact verification results.

Comment with these commands to change the behavior for this request:

Compact
gitar display:verbose         

Was this helpful? React with 👍 / 👎 | Powered by Gitar — free for open source

@yan-3005
yan-3005 merged commit be39b16 into 2.0 Nov 17, 2026
60 of 70 checks passed
@yan-3005
yan-3005 deleted the fix/2.0-glossary-approved-tagging-it-race branch November 17, 2026 15:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant