-
Notifications
You must be signed in to change notification settings - Fork 298
feat: improved concurrency state visibility #2901
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
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
| result := transformers.ToTask(taskWithData, workflowRunExternalId, workflowVersion) | ||
| // Get concurrency status for QUEUED tasks | ||
| var concurrencyStatus []*repository.ConcurrencySlotStatus | ||
| if string(taskWithData.Status) == string(gen.V1TaskStatusQUEUED) { |
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.
I'm not sure if we want to put this on it's own end point
| FROM | ||
| updated_slots; | ||
|
|
||
| -- name: GetConcurrencySlotStatus :many |
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.
might be smart to profile this query
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
Adds end-to-end “concurrency wait visibility” by exposing per-task concurrency queue status through the API and rendering it in the task detail UI, plus clearer scheduling-timeout messages in event logs.
Changes:
- Extend task summary API (
V1TaskSummary) with optionalconcurrencyStatuscontaining queue position/counts and up to 10 pending/running tasks. - Add a repository query/handler plumbing to fetch concurrency slot status for QUEUED tasks.
- Improve scheduling timeout event messages to distinguish “no worker available” vs “waiting on concurrency”.
Reviewed changes
Copilot reviewed 11 out of 12 changed files in this pull request and generated 7 comments.
Show a summary per file
| File | Description |
|---|---|
| pkg/scheduling/v1/concurrency.go | Propagates strategy expression alongside concurrency results for richer timeout messages. |
| internal/services/scheduler/v1/scheduler.go | Emits more descriptive scheduling-timeout event messages. |
| pkg/repository/sqlcv1/concurrency.sql | Adds GetConcurrencySlotStatus query to fetch queue state and related task lists. |
| pkg/repository/sqlcv1/concurrency.sql.go | sqlc-generated Go for the new concurrency status query. |
| pkg/repository/task.go | Adds GetConcurrencySlotStatus repo method and result mapping helpers. |
| api/v1/server/handlers/v1/tasks/get.go | Fetches concurrency slot status for QUEUED tasks and passes it into the transformer. |
| api/v1/server/oas/transformers/v1/tasks.go | Maps repository concurrency status into the OpenAPI V1TaskSummary model. |
| api-contracts/openapi/components/schemas/v1/task.yaml | Adds concurrencyStatus and related schemas to the OpenAPI contract. |
| api/v1/server/oas/gen/openapi.gen.go | Generated OpenAPI server types updated to include concurrency status models/fields. |
| pkg/client/rest/gen.go | Generated REST client types updated to include concurrency status models/fields. |
| frontend/app/src/lib/api/generated/data-contracts.ts | Frontend API contracts updated with concurrency status types. |
| frontend/app/src/pages/.../step-run-detail.tsx | UI renders concurrency queue state with popovers linking to queued/running tasks. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
...app/src/pages/main/v1/workflow-runs-v1/$run/v2components/step-run-detail/step-run-detail.tsx
Outdated
Show resolved
Hide resolved
…nts/step-run-detail/step-run-detail.tsx Co-authored-by: Copilot <[email protected]>
Description
Improves visibility into concurrency queue state and scheduling timeouts by providing more context in the UI and event logs.
Type of change
What's Changed
Added real-time concurrency queue status to task detail view: For QUEUED tasks with concurrency keys, the UI now displays:
Enhanced scheduling timeout event messages: When a schedule timeout occurs, the event log now specifies the cause:
<expression>" - when waiting for a concurrency slotAdded new API endpoint data: The
V1TaskSummaryresponse now includes an optionalconcurrencyStatusfield with: