Skip to content

[2.0] Fixes #37516: Reject tag recognizers saved without a supported language - #37568

Merged
gh-bot-collate[bot] merged 1 commit into
2.0from
backport/2.0/pr-37517
Nov 13, 2026
Merged

gh-bot-collate[bot] merged 1 commit into
2.0from
backport/2.0/pr-37517

Conversation

@gh-bot-collate

Copy link
Copy Markdown

Automated backport of #37517 to 2.0.

Source PR #37517
Author @ayush-shah
Merge commit 93ec4e2c71061db6a82734301b223d45c60f1851
Method Conflicts resolved by Claude — worth a read of the diff.

Resolution notes

Backport notes — PR #37517 onto 2.0

Source: 93ec4e2c71061db6a82734301b223d45c60f1851 — "Fixes #37516: Reject tag
recognizers saved without a supported language (#37517)"

Conflicts and resolution

Both conflicts were pure import-list conflicts; the functional hunks (the new
validateSupportedLanguage / validateChangedRecognizers logic in
TagRepository.java, the four new tests in TagResourceIT.java, and all of
TagRepositoryUnitTest.java) applied cleanly with no conflict markers.

  • openmetadata-service/.../TagRepository.java: conflict was in the
    import block. 2.0 has imports (Table, Thread, Team, ApiStatus,
    Column) that don't exist on main at this point (added by later,
    unrelated commits), while main's side of the conflict only added
    ClassificationLanguage. Resolved by keeping 2.0's existing imports and
    inserting ClassificationLanguage in alphabetical order among them.

  • openmetadata-integration-tests/.../TagResourceIT.java: conflict was
    also an import block. main's side added three imports — CacheBundle,
    EntityRepository, SettingsCache. Checked the full main file: only
    EntityRepository is used by code this PR added (new test helper calls
    EntityRepository.invalidateCacheForEntity(...)). CacheBundle and
    SettingsCache are used only by a glossary-tag-propagation test elsewhere
    in main's file that predates this PR and does not exist on 2.0 at all.
    Pulling those two imports over would have produced unused-import
    compile/checkstyle failures. Resolved by keeping only the
    EntityRepository import.

What a reviewer should double check

  • The ClassificationLanguage enum and the supportedLanguage field on the
    various recognizer config schemas (patternRecognizer.json,
    predefinedRecognizer.json, etc.) already exist identically on 2.0
    (verified against openmetadata-spec), so no schema changes were needed —
    this PR only adds validation on top of existing, already-backported
    infrastructure.
  • No mvn compile/test run was performed in this environment (tool
    permission for mvn was not granted); please run
    mvn test -pl openmetadata-service,openmetadata-integration-tests -am -Dtest=TagRepositoryUnitTest,TagResourceIT
    before merging.

Opened from openmetadata-collate, which holds the credentials needed to open a PR here. It merges itself once this branch's required checks pass — no review needed. If a check fails it stays open and the author of #37517 is asked to look.

resolver run

…ge (#37517)

* Reject tag recognizers saved without supportedLanguage

The ingestion client's Tag model requires recognizerConfig.supportedLanguage
for every recognizer type but predefined. The server accepted a recognizer
without it, and the client then dropped every tag of that classification from
auto-classification while the run still reported success.

* Check recognizer language only on new or edited configs

A tag stored with a language-less recognizer before the rule must stay
editable, including by recognizer feedback that patches the whole tag. Also
reject an unknown language value, which the ingestion client skips the same
way.

* Check a predefined recognizer's language when set; cover create and PUT

A predefined recognizer may omit supportedLanguage, but an unknown value is
still skipped by the ingestion client. Adds ITs for POST rejecting a recognizer
without a language and for a PUT resending stored recognizers without ids.

* Assert the language error and cover an explicit null predefined language

(cherry picked from commit 93ec4e2)
@gh-bot-collate
gh-bot-collate Bot requested a review from a team as a code owner November 11, 2026 11:32
@gh-bot-collate
gh-bot-collate Bot requested review from manerow and removed request for a team November 11, 2026 11:32
@gh-bot-collate gh-bot-collate Bot added the safe to test Add this label to run secure Github workflows on PRs label Nov 11, 2026
@gh-bot-collate
gh-bot-collate Bot enabled auto-merge (squash) November 11, 2026 11:32
@gh-bot-collate
gh-bot-collate Bot merged commit aee9867 into 2.0 Nov 13, 2026
60 of 71 checks passed
@gh-bot-collate
gh-bot-collate Bot deleted the backport/2.0/pr-37517 branch November 13, 2026 09:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

safe to test Add this label to run secure Github workflows on PRs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants