-
Notifications
You must be signed in to change notification settings - Fork 522
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
updata/update_metadata: Adds ability to add waves using TOML files #883
Conversation
Oops - fixed a tangling test data file in the wrong format and fixed the test. |
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.
We still do the same checks on waves, right? That they're in order, seed doesn't go down, etc.
I'm confused about testing, going to ask about that
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.
Your testing in the description has fleet_percentage = 0
which should be rejected, I think, not only because 0 is explicitly rejected but because the waves are out of order... can you please update the testing, and make sure we're doing proper wave sanity checks?
Gah - sorry about that. I was using a file with In regards to update order, I haven't changed the validation we're doing. Let me know if you have any other questions. |
Updated to address @tjkirch 's comments. Also updated the main description with additional testing. |
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.
No blockers, but I think it'd be good to confirm that seeds don't go down, just like we confirm times don't go down. That could prevent some issues where users think the percentages are incremental from the previous value, perhaps.
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 commit adds to updata the ability to use TOML-formatted files to add waves to an existing update. The `--wave-file` flag for the `add-wave` subcommand allows a user to specify the path to the file where waves are defined.
Improve error messages for unordered waves and invalid Add an additional comment to the |
Issue number:
Fixes #596
Description of changes:
This commit adds to updata the ability to use TOML-formatted files
to add waves to an existing update. The
--wave-file
flag forthe
add-wave
subcommand allows a user to specify the path to thefile where waves are defined.
Structs for deserializing the TOML have been added to
update_metadata
. A method onadd_waves
was also addedManifest
. This allows us to update themanifest.json
using other Rust code.Testing done:
updata
with a waves file with an invalidfleet_percentage
fails as expected.updata
with waves out of order fails as expectedupdata
with a valid waves file usin a fakemanifest.json
works a treat:Terms of contribution:
By submitting this pull request, I agree that this contribution is dual-licensed under the terms of both the Apache License, version 2.0, and the MIT license.