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

Add flag to ignore file hashes #65

Merged
merged 17 commits into from
Feb 11, 2025

Conversation

felix920506
Copy link
Contributor

Add a flag to ignore invalid file hashes.

When both --debug and --ignore-hash flags are set, invalid checksums will produce warnings but the test will continue.

@felix920506
Copy link
Contributor Author

rebasing on top of latest develop branch

Copy link
Owner

@BotBlake BotBlake left a comment

Choose a reason for hiding this comment

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

Implementation-wise this is good to go.
However it still requires UI work.

Its important to mark debug output as such.
Since you do need to reuse it a bunch of times, it might be worth defining a new constant or write a new helper function in util.py.

Also make sure that the code stays readable.
It might be clear to you that the hash_dict is gonna be filled with hash_entries which then again are filled with a type and a hash, but hiding all that behind a single letter is still not ideal.

No major changes required though. All minor UI stuff.

@felix920506 felix920506 requested a review from BotBlake February 5, 2025 04:29
Copy link
Owner

@BotBlake BotBlake left a comment

Choose a reason for hiding this comment

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

Main points:

  • Should an end-user have access to this?
    I see two options:
    1. make it invisible in the help
    2. adjust the description to make clear its potentialy dangerous
  • Make sure to use the new print_debug() in all places where manual debug styling was done before
  • Dont print EVERYTHING on the terminal "just because"
  • be aware of all possible situations obtain_source can be called in.

Make sure to not only test the changes on the system you had the issue on, but also on one where it never occured/ you had the files already/ the files are actually faulty/ ...
Especially here in obtain_source, a lot of different states and edgecases can happen.

@felix920506 felix920506 requested a review from BotBlake February 8, 2025 02:43
Copy link
Owner

@BotBlake BotBlake left a comment

Choose a reason for hiding this comment

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

lgtm

@BotBlake BotBlake merged commit 1c7043e into BotBlake:develop Feb 11, 2025
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants