-
-
Notifications
You must be signed in to change notification settings - Fork 65
feat: filter grouping multiple workflows by queue-name #120
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
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 enhances the workflow queue filtering mechanism to support searching for queue names across all workflows in the repository, rather than being limited to a single workflow. This improves the flexibility and reliability of the queueing logic in multi-workflow environments.
- Modified the Waiter class to accept and utilize a list of all workflows when filtering by queue name
- Implemented batched workflow run fetching (batch size: 10) to improve efficiency and avoid rate limits
- Enhanced error handling using Promise.allSettled for graceful handling of failed workflow run requests
Reviewed Changes
Copilot reviewed 4 out of 6 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| src/wait.ts | Enhanced queue filtering logic to search across all workflows with batching and error handling |
| src/main.ts | Updated Waiter instantiation to pass the full workflows list |
| package.json | Upgraded vitest dev dependency from ^3.1.4 to ^3.2.4 |
| tests/wait.test.ts | Added comprehensive test coverage for cross-workflow queue filtering behavior |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
…develop Signed-off-by: Rui Chen <rui@chenrui.dev>
chenrui333
left a comment
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.
lgtm, thanks!
Hello, this PR enhances the workflow queue filtering mechanism to support searching for queue names across all workflows in the repository, rather than being limited to a single workflow. This improves the flexibility and reliability of the queueing logic, especially in complex repositories with multiple workflows.
Changes
src/main.tsto pass the full list of workflows as an argument.wait.tests.tsto increase code coverage and validate behavior when queueName is definedMotivation
Previously, filtering by queueName only checked runs from a single workflow. In multi-workflow environments, jobs enqueued with the same queue name could be missed. This update ensures all workflows are considered, improving the accuracy of the waiting/queueing mechanism.