Repository navigation
[2.0] Fixes #37516: Reject tag recognizers saved without a supported language - #37568
Merged
Merged
Conversation
…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
Bot
requested review from
manerow
and removed request for
a team
November 11, 2026 11:32
15 tasks done
ayush-shah
approved these changes
Nov 13, 2026
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.
Automated backport of #37517 to
2.0.93ec4e2c71061db6a82734301b223d45c60f1851Resolution notes
Backport notes — PR #37517 onto
2.0Source:
93ec4e2c71061db6a82734301b223d45c60f1851— "Fixes #37516: Reject tagrecognizers saved without a supported language (#37517)"
Conflicts and resolution
Both conflicts were pure import-list conflicts; the functional hunks (the new
validateSupportedLanguage/validateChangedRecognizerslogic inTagRepository.java, the four new tests inTagResourceIT.java, and all ofTagRepositoryUnitTest.java) applied cleanly with no conflict markers.openmetadata-service/.../TagRepository.java: conflict was in theimport block.
2.0has imports (Table,Thread,Team,ApiStatus,Column) that don't exist onmainat this point (added by later,unrelated commits), while
main's side of the conflict only addedClassificationLanguage. Resolved by keeping2.0's existing imports andinserting
ClassificationLanguagein alphabetical order among them.openmetadata-integration-tests/.../TagResourceIT.java: conflict wasalso an import block.
main's side added three imports —CacheBundle,EntityRepository,SettingsCache. Checked the fullmainfile: onlyEntityRepositoryis used by code this PR added (new test helper callsEntityRepository.invalidateCacheForEntity(...)).CacheBundleandSettingsCacheare used only by a glossary-tag-propagation test elsewherein
main's file that predates this PR and does not exist on2.0at all.Pulling those two imports over would have produced unused-import
compile/checkstyle failures. Resolved by keeping only the
EntityRepositoryimport.What a reviewer should double check
ClassificationLanguageenum and thesupportedLanguagefield on thevarious recognizer config schemas (
patternRecognizer.json,predefinedRecognizer.json, etc.) already exist identically on2.0(verified against
openmetadata-spec), so no schema changes were needed —this PR only adds validation on top of existing, already-backported
infrastructure.
mvn compile/test run was performed in this environment (toolpermission for
mvnwas not granted); please runmvn test -pl openmetadata-service,openmetadata-integration-tests -am -Dtest=TagRepositoryUnitTest,TagResourceITbefore 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