Skip to content

Conversation

@Bhanuagr
Copy link
Contributor

@Bhanuagr Bhanuagr commented Nov 13, 2025

Root Cause

The error occurs during tag fetching in TagLabelUtil:

  1. addDerivedTags() method - When fetching derived/related tags for glossary terms, if a referenced term doesn't exist, EntityNotFoundException is thrown
  2. populateTagLabel() method - When batch-fetching glossary term entities, if any term is missing, the entire operation fails

These exceptions propagate up through the call stack and cause the entire getByName API to fail.

Solution

Added comprehensive error handling in TagLabelUtil.java to gracefully skip missing glossary terms:

  • addDerivedTags(): Wrapped getDerivedTags() call in try-catch to log warning and continue processing other tags
  • populateTagLabel(): Separated tag and term fetching into individual try-catch blocks to isolate failures
  • applyTagCommonFields(): Gracefully handles missing tags/glossary terms during field enrichment
  • Missing glossary terms are now logged and gracefully skipped
  • Dashboard loads successfully with all other details intact

Type of change:

  • Bug fix
  • Improvement
  • New feature
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation

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.
  • For JSON Schema changes: I updated the migration scripts or explained why it is not needed.

@github-actions
Copy link
Contributor

The Java checkstyle failed.

Please run mvn spotless:apply in the root of your repository and commit the changes to this PR.
You can also use pre-commit to automate the Java code formatting.

You can install the pre-commit hooks with make install_test precommit_install.

@github-actions
Copy link
Contributor

github-actions bot commented Nov 14, 2025

Jest test Coverage

UI tests summary

Lines Statements Branches Functions
Coverage: 63%
63.83% (48814/76481) 40.81% (23376/57285) 44.32% (7354/16593)

c.setTags(new ArrayList<>());
} else {
c.setTags(addDerivedTags(columnTag));
c.setTags(addDerivedTagsGracefully(columnTag));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let's use the same name

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what do you mean by same name ? function name need to be different if same parameters list to pass, right ?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

addDerivedTags we are updating all the occurance
we can still call that addDerivedTags instaed of addDerivedTagsGracefully, it's a minor nit nothing on functionality "Gracefully" can be removed i meant

@sonarqubecloud
Copy link

@Bhanuagr Bhanuagr merged commit 6a07277 into main Nov 21, 2025
34 of 37 checks passed
@Bhanuagr Bhanuagr deleted the fix/graceful-handling-missing-glossary-terms branch November 21, 2025 12:06
@github-actions
Copy link
Contributor

Failed to cherry-pick changes to the 1.10.8 branch.
Please cherry-pick the changes manually.
You can find more details here.

Bhanuagr added a commit that referenced this pull request Nov 21, 2025
…nce deleted glossary terms or tags (#24340)

* Fixes 404 error when loading dashboards that reference deleted glossary terms

* Fixed tests
ayush-shah pushed a commit that referenced this pull request Nov 27, 2025
…nce deleted glossary terms or tags (#24340)

* Fixes 404 error when loading dashboards that reference deleted glossary terms

* Fixed tests
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backend safe to test Add this label to run secure Github workflows on PRs To release Will cherry-pick this PR into the release branch

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants