fix bugs in ping logic, ping hosts in parallel, and tweak README and LICENSE - #11
Merged
Conversation
oxtoacart
force-pushed
the
percy/corp32862-2
branch
2 times, most recently
from
October 1, 2025 15:57
8ccfe84 to
22d30cf
Compare
oxtoacart
commented
Oct 1, 2025
| let start = new Date().getTime(); | ||
| var first = true; | ||
| while ((new Date().getTime() - start) / 1000 < 180) { | ||
| if (!first) { |
Collaborator
Author
There was a problem hiding this comment.
My OG implementation of this was broken, I wasn't actually calling wait, and I wasn't using await :(
oxtoacart
commented
Oct 1, 2025
| if (i < 0) { | ||
| let start = new Date().getTime(); | ||
| var first = true; | ||
| while ((new Date().getTime() - start) / 1000 < 180) { |
Collaborator
Author
There was a problem hiding this comment.
This allows us to more precisely enforce our promise of limiting this to 3 minutes. It's not perfect, but pretty good.
oxtoacart
force-pushed
the
percy/corp32862-2
branch
6 times, most recently
from
October 1, 2025 16:26
3e92905 to
46e00aa
Compare
oxtoacart
force-pushed
the
percy/corp32862-2
branch
from
October 1, 2025 16:28
46e00aa to
7b95fc5
Compare
…LICENSE The ping logic had some bugs in the wait logic which are now fixed. Pinging hosts in parallel will speed up CI. LICENSE and README got small updates in preparation for moving this code to tailscale/github-action. Updates tailscale/corp#32862 Signed-off-by: Percy Wegmann <percy@tailscale.com>
oxtoacart
force-pushed
the
percy/corp32862-2
branch
from
October 1, 2025 16:29
7b95fc5 to
8a3cfd2
Compare
oxtoacart
commented
Oct 1, 2025
| // Try for up to 180 seconds (3 minutes). | ||
| while ((new Date().getTime() - start) / 1000 < 180) { | ||
| if (i > 0) { | ||
| // Exponential backoff on wait time, with maximum 5 second wait. |
Collaborator
Author
There was a problem hiding this comment.
You can see this in action on this CI run.
jaxxstorm
approved these changes
Oct 1, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The ping logic had some bugs in the wait logic which are now fixed.
Pinging hosts in parallel will speed up CI.
LICENSE and README got small updates in preparation for moving this code
to tailscale/github-action.
Updates tailscale/corp#32862