fix(ui) Show editable field info for fields based on exact fieldPath version #12570
+17
−12
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.
We had a bug where if ingestion originally had a v1 fieldPath for a column, then a user adds a tag or a term, this adds a v1 fieldPath in editableSchemaMetadata with this tag/term.
Then if ingestion switches to v2 fieldPath, so whenever we add a tag or term, it adds it under editableSchemaMetadata with the v2 fieldPath.
However, the bug here is that we render the editable info for a field for whichever version of the fieldPath we find first in editableSchemaMetadata - so if we find v2 fieldPath first, we render that always. so we never show the new edits to the v2 field path.
My fix here is that for where we display editable info for a field, it should always match exactly what is coming from schemaMetadata either v1 or v2. That way when you edit a field, it always shows your current edits.
This means there's a possible bug if ingestion switches back and forth between v1 and v2 field paths, we will show the editable info of whatever the current version is. so ideally we don't switch back and forth between the two. But this is better than we currently have
Checklist