-
Notifications
You must be signed in to change notification settings - Fork 203
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
Improve error when checksum dict has no entry for a file #4150
Merged
Merged
Changes from 1 commit
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
aaf6564
Improve error when checksum dict has no entry for a file
Flamefire b81e37a
Merge branch 'develop' into fix-checksum-check
boegel ea926f1
Improve error when checksum dict has no entry for a file
Flamefire 95c788f
Update checksum type error message
Flamefire d0d24e6
Merge branch 'develop' into fix-checksum-check
boegel 182881b
Merge branch 'fix-checksum-check' of github.com:Flamefire/easybuild-f…
boegel f60d2c6
improve error message produced by verify_checksum
boegel 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
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.
How about this:
--enforce-checksums
is enabled;--enforce-checksums
is not enabled, the skipping of the checksum is simply skipped here, by usingcontinue
: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 wanted to keep the current behavior that this situation is an error and just provide a meaningful error message.
I drafted easybuilders/easybuild-docs#104 where there are some open question on how checksums should be handled which is likely a breaking change (or a handful of breaking changes)
IMO a dict with a missing filename/key is an error: Likely the dict was meant for arch-specific files&checksums but a new arch is used which wasn't tested yet. Or a spelling error happened making it always fail to verify checksums even if it should.
That's what I suggested in the draft mentioned above: A dict, if present, needs to list each possible filename even without
enforce-checksums
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.
BTW: With a recent issue I noticed that
enforce-checksums
might be to greedy: We need aNone
value if the archive (e.g. Git checkout) isn't checksummable. But we want to check that all other checksums are present.Now we don't (usually) have lists anymore but lists of dicts of filename-to-checksum. Now if
enforce-checksums
triggers for every explicitNone
but a missing filename in a dict doesn't trigger an error if it isn't set we have no way to check e.g. the (old) PyTorch ECs reliably.Hence I think the approach I suggested makes sense.
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.
Thanks for clarifying, I agree that this is at least a good step forward to avoid totally meaningless errors.
If you noticed any other problems, please make sure there's an issue open for it (or if not, open one)