-
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
updog: change method of determining update availability #993
updog: change method of determining update availability #993
Conversation
f24b877
to
0b89188
Compare
8890335
to
7dcc339
Compare
return time >= target_time; | ||
} else { | ||
// Check if last wave has started | ||
return time >= start; |
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.
The last wave does not have any jittering or ramping. We could avoid this by making our last wave always start with MAX_SEED in the manifest (I think). Otherwise I'm not sure how we could avoid all hosts in the last wave hitting at the same time.
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.
Yeah, even before this change, the hosts part of the last wave will always all update at once.
That would mean we would always need to define the duration of the last wave in our waves.toml
which currently we do not.
I think I'll go ahead and define the duration of the last wave to be 1 day.
So for example, if the last wave has 2048-512=1536 seeds allocated to it (going off of our default-waves.toml
), then the time increment for each succeeding seed value would be (86400 seconds / 1536) ~= 1 minute. Does that sound reasonable? @tjkirch
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.
I don't love the idea of using an arbitrary time period for the last wave - I'd rather clean up our understanding of wave definitions, which is currently fairly murky. I've already seen people interpreting the wave times differently. The "initial" wave is weird because it shouldn't actually get used, the final wave is weird because of this jump, intermediate waves still have questions about whether the time is start vs. end, etc.
Until we fix that, I think we could set an explicit ramp for the last wave in our wave TOML files by adding another wave at the end for 99/100%.
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.
Some comments on update_metadata; I'll go through updog soon!
This also removes the --timestamp option since it's no longer necessary without updog returning the jittered time.
This is a breaking change, would you please add this part to the commit message too? (Personally I'd put the next paragraph of the PR description into the commit message, too; people sometimes look there for reasoning and usage of changes.)
Because of that and the other changes to pub
functions/structs, we need to make sure it goes into a breaking release like 0.5.0.
3b88ec5
to
0dcc523
Compare
Push above addresses @webern and @tjkirch 's comments.
|
This force push fixes |
0dcc523
to
7cdfe90
Compare
Made some small changes to the |
7cdfe90
to
8abc253
Compare
Force push above addresses the following:
|
bb88195
to
6eac239
Compare
Push above adds a few more test cases |
90db2cd
to
e68f46a
Compare
Push above adds some comments to the wave toml files. |
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.
Woohoo!
One other thing I'd be interested in seeing, in your PR testing, is that the update becomes available when you adjust your seed downward to fit into the current wave. It's not quite 7/19 yet, so there's a little window to check :)
e68f46a
to
2683364
Compare
Rebased onto develop to fix some minor conflicts. Addresses @tjkirch 's review comments.
Updated PR description to include this testing. |
2683364
to
429cc38
Compare
Push above addresses @tjkirch 's comments. Separated out the Push below removes some redundant wave set up. |
429cc38
to
cca416e
Compare
This removes jittering in updog and instead use the seed to find a target time position within the wave to determine whether an update is available. This also removes the --timestamp option since it's no longer necessary without updog returning the jittered time. As a result of this change, updates will only be visible if they are available (host is past their defined update wave). To see all updates regardless of update waves, either --ignore-waves needs to be specified or settings.updates.ignore-waves needs to be set to true.
To avoid having all the hosts in the last wave all updating at once when the last wave starts, we define an intermediary wave before the actual last wave to define its wave duration so updog can evenly spread the hosts throughout the "last" wave.
cca416e
to
a9ee7a9
Compare
Push above refactors the tests a little. |
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.
Issue number:
N/A
Description of changes:
Testing done:
updog
unit tests pass, newly created unit test forupdate_metadata
passes.Testing in an instance:
Confirmed that the seed value places the host in the last wave for v0.4.1 which starts on 7/19
Check update without ignoring waves, v0.4.1 does not show up since our wave hasn't started:
Calling
updog update
gives me 0.4.0:With
--ignore-waves
set, 0.4.1 becomes visibleCalling
updog update --ignore-waves
gives me v0.4.1:I manually edited
/etc/updog.toml
to lower the seed value to fit a wave that has already passed:And now v0.4.1 shows up as an available update even without the
--ignore-waves
flag.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.