-
Notifications
You must be signed in to change notification settings - Fork 28
Blake3 migration #1740
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
base: master
Are you sure you want to change the base?
Blake3 migration #1740
Changes from all commits
8005dbd
4075634
5325b62
4310690
6c997ca
cf3966b
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,7 +1,7 @@ | ||
| #ifndef WAKE_SCHEMA_H | ||
| #define WAKE_SCHEMA_H | ||
|
|
||
| #define SCHEMA_VERSION "9" | ||
| #define SCHEMA_VERSION "10" | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Even if the schema wasn't manually updated, i will still consider this a bump to the schema version since the underlying file hashes has changed |
||
|
|
||
| // Increment the SCHEMA_VERSION every time the below string changes. | ||
| // Also add migrations to the wake-migration tool if needed. | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -190,6 +190,22 @@ static std::vector<Migration> get_migrations() { | |
| }, | ||
| "Convert runner_status from INTEGER to TEXT"}, | ||
|
|
||
| // Version 9 -> 10: Hash algorithm changed from BLAKE2b to BLAKE3 | ||
| // Migration is not supported - user must delete wake.db and reinitialize | ||
| {9, 10, | ||
| [](sqlite3* db) -> bool { | ||
| (void)db; // unused | ||
| std::cerr << std::endl; | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't think users can really migrate to this newest DB version, without starting a fresh wake.db
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Certainly not if we want to drop blake2 support :). We /could/ support this if we wanted -- promote to one of the schemes (maybe like SRI hashes) that specifies the hash kind with the hash value/result, but I'm on board with the break. Just saying it's not necessary, but also without costs of course. |
||
| std::cerr << "Wake has been upgraded from BLAKE2b to BLAKE3 hashing." << std::endl; | ||
| std::cerr << "Your existing wake.db is incompatible and must be deleted." << std::endl; | ||
| std::cerr << std::endl; | ||
| std::cerr << "Please run:" << std::endl; | ||
| std::cerr << " rm wake.db && wake --init ." << std::endl; | ||
| std::cerr << std::endl; | ||
| return false; | ||
| }, | ||
| "Hash algorithm changed from BLAKE2b to BLAKE3 - manual deletion required"}, | ||
|
|
||
| }; | ||
| } | ||
|
|
||
|
|
||
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 makefile, and the blake3.wake file, were changed according to the documentation on how to build for each platform: https://github.com/BLAKE3-team/BLAKE3/tree/master/c#building-manually