GH Issue 1257: Check for duplicates among field names, import aliases, and parent import aliases - #7884
Open
labkey-susanh wants to merge 4 commits into
Open
GH Issue 1257: Check for duplicates among field names, import aliases, and parent import aliases#7884labkey-susanh wants to merge 4 commits into
labkey-susanh wants to merge 4 commits into
Conversation
…, and parent import aliases
…le to all domains and tap into domain designer error messaging
labkey-susanh
commented
Jul 27, 2026
| { | ||
| throw new IllegalArgumentException(String.format("An existing " + dataTypeNoun + " property conflicts with parent alias header: %1$s", trimmedKey)); | ||
| // This allows existing domains to save with conflicting aliases. Should it? | ||
| if (!existingAliases.contains(trimmedKey)) |
Contributor
Author
There was a problem hiding this comment.
@cnathe or @XingY. Do you know if this check is still valid? What is the use case where we want to allow retention of an existing alias that conflicts with a field name? Was this to protect against cases where we add (system) domain fields that conflict with already-existing import aliases? Still seems problematic to produce conflicts that we won't be able to resolve well during import.
Contributor
There was a problem hiding this comment.
This check was added in #894. I guess the intention was to not break existing designer update that was already problematic. I agree in this case we should opt for rejecting ambiguity, even if the designer was not actually changed.
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.
Rationale
Issue 1257: We currently permit duplicate aliases on field names in a domain as well as aliases that collide with a field name or, in the case of sample types and data classes, parent import aliases. This results in ambiguity when doing data imports so we want to prevent domains from being created in this way. This PR adds validation of the import aliases to check for overlap and for the parent import aliases to check for overlap with field import aliases. (There was already a check for overlap of parent import aliases and domain field names.)
Related Pull Requests
Changes
validateParentAliasesto check for conflicts with field import aliasesDomainUtils::validatePropertiesto check for import alias conflicts