-
Notifications
You must be signed in to change notification settings - Fork 0
Alter Options hash behavior #70
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
Conversation
|
I've currently got a cold and a fever, so this PR might be a bit messy. Let me know if this solves your options problem from #33 and then we can merge. |
|
Thanks for the quick fix. Unfortunately, I now get the following error when calling |
|
I suggest |
|
Just realized that this wasn't even part of this PR.... |
ronald-jaepel
left a comment
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.
Cool! Again what learned :)
|
unfortunately, the |
cadetrdm/repositories.py
Outdated
| self.fix_gitattributes_log_tsv() | ||
| if version_sum < 1007: | ||
| warnings.warn("Repo version has outdated options hashes. Updating option hashes in output log.tsv.") | ||
| self.output_repo.update_log_hashes() |
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.
don't we need to set the changes_were_made flag here, too? Otherwise, it will never actually update the version number and always try to update the log hashes.
|
To document our insight from Discord: |
cadetrdm/repositories.py
Outdated
| entry.options_hash = options.get_hash() | ||
|
|
||
| self.checkout(self.main_branch) | ||
| log.write() |
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.
This crashes if len(log.entries) == 0 (i.e. a repo that has never been run).
now excludes keys starting with _, containing __ or listed in {"commit_message", "push", "debug", "force"}.
Key removal is recursive.
For logs of old cadet-RDM repositories, OutputRepo.update_log_hashes can bring the log up to date.
ecf5e98 to
a839080
Compare
Hashing now excludes keys:
Key removal is recursive.
For logs of old cadet-RDM repositories, OutputRepo.update_log_hashes can bring the log up to date.