fix(compact lineage tab): do not use viewUrn as input for searchAcrossLineage graphql call #12748
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.
I was exploring https://demo.datahubproject.io/ and noticed that the compact lineage tab will not load when the "New User Experience" is enabled.
Example
Screen.Recording.2025-02-28.at.1.03.32.pm.mov
Note: this can easily be reproduced on the demo instance.
Upon further investigation, this only happens when the user uses a view. The error provided by the graphql endpoint is as follows:
"The variables input contains a field name 'viewUrn' that is not defined for input object type 'SearchAcrossLineageInput' "
.I spent some time tracking down the correct way to fix the issue but it appears that the v2 operation does not use a
viewUrn
which makes sense to me (in terms of business logic). For this reason, I've excluded the problematic field from the<CompactLineageTab />
component's data query.After Fix
Screen.Recording.2025-02-28.at.12.57.33.pm.mov
Please LMK if there are existing component/integration tests I can use as a template to test this fix.
Thanks,
Checklist