-
Notifications
You must be signed in to change notification settings - Fork 58
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
Fail On Duplicate Config Names #1372
Merged
priyawadhwa
merged 8 commits into
wolfi-dev:main
from
paulgibert:paulgibert/block-duplicates
Jan 8, 2025
Merged
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
8aee6a1
Updated melange to fail if a duplicate package config name is encount…
paulgibert e9a053c
Updated duplicate test files with different versions
paulgibert 6f6cab9
Update comment typo
paulgibert c797060
Added file names to error messages and added check to ensure the pack…
paulgibert 40edcf1
Merge branch 'wolfi-dev:main' into paulgibert/block-duplicates
paulgibert cb7fa84
Linted melange files
paulgibert 2a71d32
Merge branch 'paulgibert/block-duplicates' of github.com:paulgibert/w…
paulgibert 8a55195
Fixed check-subpipeline-version-matches test
paulgibert File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
package: | ||
name: foo | ||
version: 1.2.3 |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
package: | ||
name: foo | ||
version: 1.2.4 |
Oops, something went wrong.
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.
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 think we might also want to fail if
.package.name
is not the same as the filename.These are potentially different/separate issues, but it does I think violate some assumptions we've made, and is worth avoiding.
If we have that check, we also get uniqueness "for free" since there can't be two
foo.yaml
sThere 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.
If the .package.name field must match the filename, couldn't you make an argument that the field is redundant and should be removed?
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 added a check to error if the config name does not match the package name. This makes it impossible to test the package duplicate logic because, as you said, this gives us uniqueness for free, but I left the original check in just in case.
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.
It probably is redundant, but I don't think we can easily remove it without causing lots and lots of downstream effects. I think it's fine to leave it, and just ensure it's the same as the filename, for now.