-
Notifications
You must be signed in to change notification settings - Fork 49
Add email filtering, job queue filtering, and job cancel command #538
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
Merged
JoeColeman95
merged 9 commits into
main
from
SUP-4687/Job-cancel-queue-filter-email-filter
Sep 11, 2025
Merged
Add email filtering, job queue filtering, and job cancel command #538
JoeColeman95
merged 9 commits into
main
from
SUP-4687/Job-cancel-queue-filter-email-filter
Sep 11, 2025
Conversation
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
Implements GitHub issue #528 with comprehensive job listing functionality: - Job filtering by queue, state, duration, pipeline, time range - Hybrid server-side/client-side filtering for performance - Sorting by start_time and duration with multiple output formats Also enhances agent list with JSON/YAML output support and improved pagination. Fixes #528 Fixes #527
Implements three GitHub issues with GraphQL optimizations: - Email creator filtering (#530) - `bk build list --creator [email protected]` now resolves emails to user IDs via GraphQL - Queue-based job filtering (#532) - `bk job list --queue default` uses server-side GraphQL filtering for better performance - Job cancel command (#531) - `bk job cancel <job-id>` added following existing job command patterns The job list implementation uses a hybrid approach of GraphQL for queue filtering, which prevents the performance issues with large datasets while maintaining full filter compatibility. Fixes: #530 Fixes: #531 Fixes: #532
scadu
reviewed
Sep 11, 2025
- Split GraphQL query into FindClusters and FindQueuesForCluster for proper pagination - Implement concurrent queue fetching across clusters with rate limiting - Handle unlimited clusters/queues to prevent missing data in large organizations
scadu
reviewed
Sep 11, 2025
| err = io.SpinWhile("Loading jobs", func() { | ||
| jobs, err = fetchJobs(cmd.Context(), f, org, opts, listOpts) | ||
| if opts.queue != "" { | ||
| jobs, err = fetchJobsWithQueueFilter(cmd.Context(), f, org, opts) |
Contributor
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.
Would be good to document the queue filtering behavior when multiple clusters have queues with the same name.
Contributor
|
Looking good! I like the separation of concerns. |
scadu
approved these changes
Sep 11, 2025
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.
Implements three GitHub issues with GraphQL optimizations:
Email creator filtering ([Bug]: bk build list --creator option results in "No builds found" #530)
bk build list --creator [email protected]now resolves emails to user IDs via GraphQLQueue-based job filtering ([Bug]: bk job list --queue option results in "No jobs found" #532)
bk job list --queue defaultuses server-side GraphQL filtering for better performanceJob cancel command (💡 feat: bk job cancel command #531)
bk job cancel <job-id>added following existing job command patternsFixes
bk_io.Confirm()function as it was not properly handling the--yesflag in non-interactive, even when provided it would still attempt to initialize a TTY causing failures. The benefits all confirmation prompts (build cancel, job cancel) and removes the requirement for TTY.The job list implementation uses a hybrid approach of GraphQL for queue filtering, which prevents the performance issues with large datasets while maintaining full filter compatibility.
Fixes: #530
Fixes: #531
Fixes: #532