Skip to content
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

Fix the checksum type check #4578

Merged
merged 4 commits into from
Dec 19, 2024

Conversation

Flamefire
Copy link
Contributor

This is #4164 rebased on 5.0x

Except for one conflict (string_type -> str) it was trivial. So #4164 should still be viable for develop

The None case was missed and due to the unrestricted tuple elem_type it may return valid for actually invalid entries.
So restrict that beeing overly cautious so it may wrongly return invalid.
But in that case the conversion function will be called which can do more elaborate verification.

Add test checking for None in checksums.

Also required for #4142 as the check now correctly handles a None value in the dict

@boegel boegel added bug fix EasyBuild-5.0 EasyBuild 5.0 labels Jul 31, 2024
@boegel boegel added this to the 5.0 milestone Jul 31, 2024
@boegel boegel changed the title Fix the checksum type check - 5.0x Fix the checksum type check Jul 31, 2024
Copy link
Contributor

@Micket Micket left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@Micket
Copy link
Contributor

Micket commented Dec 18, 2024

Question; this just allows the type-checking step to pass, is this still expected to fail to actually use dict+None (because it does in my test)? I assume i need another one of your PR that fixes that right?

@Flamefire Flamefire mentioned this pull request Dec 18, 2024
1 task
The `None` case was missed and due to the unrestricted `tuple` elem_type
it may return valid for actually invalid entries.
So restrict that beeing overly cautious so it may wrongly return invalid.
But in that case the conversion function will be called which can do more
elaborate verification.

Add test checking for None in checksums.
…bility

Not sure if that makes sense but at least for EB 4.x we need this.
@Flamefire Flamefire force-pushed the fix-checksums-verification-5 branch from 4e72116 to 099fc5b Compare December 18, 2024 16:04
@Flamefire
Copy link
Contributor Author

Question; this just allows the type-checking step to pass, is this still expected to fail to actually use dict+None (because it does in my test)? I assume i need another one of your PR that fixes that right?

I'm not sure which error but I guess you need #4711
This and/or #4579 fix the parsing of that: If the type check is wrong, to_checksums is invoked which is broken too. With this PR to_checksum will not be invoked and with #4579 but without this calling to_checksums at least wont crash even if it is redundantly called.

@Micket Micket merged commit 2281945 into easybuilders:5.0.x Dec 19, 2024
39 checks passed
@Flamefire Flamefire deleted the fix-checksums-verification-5 branch December 19, 2024 13:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Blockers
Development

Successfully merging this pull request may close these issues.

3 participants