feat: Implement list and discard for workerpools queue#412
Open
jchanam wants to merge 2 commits intospacelift-io:mainfrom
Open
feat: Implement list and discard for workerpools queue#412jchanam wants to merge 2 commits intospacelift-io:mainfrom
jchanam wants to merge 2 commits intospacelift-io:mainfrom
Conversation
Signed-off-by: Julio Chana <julio.chana@lokalise.com>
Signed-off-by: Julio Chana <julio.chana@lokalise.com>
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
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.
Description
Adds
workerpool worker queuecommand to manage runs in a worker pool’s schedulable queue from the CLI:queue listshows queued runs (table or JSON).queue discardsupports a single run via--stackand--run, or bulk discard with the same filters as list plus--yesto confirm.Uses
searchSchedulableRunsonpublicWorkerPool(no--pool-id) orworkerPool(id: …)for a private pool, andrunDiscard(stack:, run:)for discard. API search predicates includeisPrioritized,state, andtype;--stack,--drift-detection, and--commitare applied client-side after paging results so--limitstill applies for bulk discard when those filters are used.Type of Change
Changes Made
spacectl workerpool worker queue listandspacectl workerpool worker queue discardinternal/cmd/workerpools/queue.go— GraphQL queries, list/discard actions,collectSchedulableRuns(pagination + client-side filters), API-only predicates inbuildAPISchedulableRunPredicatesinternal/cmd/workerpools/cmd.go— command registrationinternal/cmd/workerpools/flags.go— queue-related flags and help textTesting
go test ./...)Screenshots (if applicable)
N/A (CLI only).
Checklist
Related Issues
Closes #
Fixes #
Related to https://feedback.spacelift.io/p/allow-manage-runs-with-spacectl