Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@JoeColeman95
Copy link
Contributor

@JoeColeman95 JoeColeman95 commented Sep 11, 2025

Implements three GitHub issues with GraphQL optimizations:

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

JoeColeman95 and others added 7 commits September 2, 2025 15:43
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
@JoeColeman95 JoeColeman95 marked this pull request as ready for review September 11, 2025 10:48
@JoeColeman95 JoeColeman95 requested a review from a team as a code owner September 11, 2025 10:48
- 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
@JoeColeman95 JoeColeman95 requested a review from scadu September 11, 2025 14:11
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)
Copy link
Contributor

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.

@scadu
Copy link
Contributor

scadu commented Sep 11, 2025

Looking good! I like the separation of concerns.

@JoeColeman95 JoeColeman95 merged commit 006ef21 into main Sep 11, 2025
1 check passed
@JoeColeman95 JoeColeman95 deleted the SUP-4687/Job-cancel-queue-filter-email-filter branch September 11, 2025 14:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

3 participants