-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Verify that component namespace and name combinations are unique #685
Conversation
// Verify that all configs except the disabled ones are unique | ||
// Even configs disabled by the query should be unique as they might be picked up as a dependency | ||
// Only allowed exception are configs where the status is set to disabled | ||
val uniqueConfigs = allConfigs.groupBy(config => config.functionality.namespace.map(_ + "/").getOrElse("") + config.functionality.name) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perhaps you could also add organisation to this id. Wdyt?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But the organisation isn't used in the output path, so collisions could still happen then.
However, this reminds me that I wanted to look into using ViashNamespace.targetOutputPath(...)
as the key generator - as that is what determines what would result in collisions and means that once we have more flexibility in the folder name strategy as previously discussed, we're halfway there in solving that too.
Wdyt? ping pong
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see -- good point.
Should we even consider the use-case where one might use multiple organisations in one project -- perhaps not?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The one I see most likely to happen is a project that sets the organisation but with one or more components where the organisation is not set. In that regard it's still 2 different values for the organisation.
In itself it doesn't really hurt much but it's probably an error.
If we want a check for that, I'd suggest displaying a warning and adding it to Viash 0.9 (or later).
Add wrapper to call targetOutputPath with config instead individual namespace and name fields
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
Describe your changes
Verify that component namespace and name combinations are unique
Related issue(s)
Closes #684
Type of Change
Checklist
Requirements:
Tests:
Documentation:
Test Environment