-
Notifications
You must be signed in to change notification settings - Fork 2
fix: Increase wait for janus workflow to begin #574
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: main
Are you sure you want to change the base?
Conversation
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.
Pull Request Overview
This PR aims to increase the wait time before checking for the janus workflow run ID in order to reduce failures due to timing issues.
- Increased the sleep duration from 5 to 10 seconds in the workflow file.
- Added explicit error handling when no workflow run is found.
Comments suppressed due to low confidence (1)
.github/workflows/trigger-private-janus-build.yml:112
- [nitpick] Consider enhancing the error message to include additional context (e.g., current wait duration or timestamp) for more effective debugging.
if (!result.data.workflow_runs || result.data.workflow_runs.length === 0) {
@@ -92,7 +92,7 @@ jobs: | |||
ref: 'main' | |||
}) | |||
|
|||
- run: sleep 5 # wait for event to register within github system | |||
- run: sleep 10 # wait for event to register within github system |
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.
[nitpick] Relying on a fixed sleep time can be brittle in variable environments; consider implementing a retry mechanism for improved robustness.
Copilot uses AI. Check for mistakes.
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.
A retry mechanism sounds like a good idea - is this tricky to implement?
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.
There doesn't appear to be any built-in functionality to retry a step apart from using custom actions.
So I've just wrapped the call in a repeated block.
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.
Pull Request Overview
This PR aims to reduce failures by increasing the waiting period before querying for the Janus workflow ID.
- Replaces a static sleep with an asynchronous retry mechanism using exponential backoff.
- Introduces a new JavaScript function to repeatedly fetch the workflow ID with configurable delays.
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.
👍
What is the purpose of this change?
Make it more likely that the janus workflow will have begun before looking for its ID.
What is the value of this change and how do we measure success?
We've seen various failures in recent months because of delays.
This should reduce the number of failures before we find a better solution.