Skip to content
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

[semver:minor] Detect on-hold pipelines #82

Open
donnyyung opened this issue Jul 5, 2022 · 1 comment
Open

[semver:minor] Detect on-hold pipelines #82

donnyyung opened this issue Jul 5, 2022 · 1 comment
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@donnyyung
Copy link

Is your feature request related to a problem? Please describe.
I've noticed when using the queue, Circle CI doesn't list a pipeline as running when using the running filter if the pipeline is using the hold job (ex: https://circleci.com/docs/workflows#holding-a-workflow-for-a-manual-approval), so subsequent pipelines may kick off while in that waiting period. (I think this might be a circle limitation but wanted to see if you had any ideas)

Describe the solution you'd like
The queue would be able to block until all running or on_hold pipelines were finished.

Describe alternatives you've considered
I'm trying to think of workarounds, and that might be ultimately what is needed, but wanted to create an issue to see if this was a known problem or if other people have found workarounds.

Additional context

@eddiewebb eddiewebb added enhancement New feature or request good first issue Good for newcomers labels Oct 29, 2022
@tkoft
Copy link

tkoft commented Oct 18, 2023

This fork uses circleci v2 api to get workflows and check their status. Unfortunately, it only checks for "running" or "created" status, not "on_hold". I may open a PR there. https://github.com/promiseofcake/circleci-workflow-queue/blob/main/src/scripts/queue.sh#L69

This change might be difficult in this orb because the "root" API call is getting a list running jobs from v1 API. Incorporating this feature would mean revamping the entire wait loop to fetch to fetch all workflows for a project (get pipelines for project, then get workflows for each pipeline, each result possibly paginated), then filtering on status. This is an entirely different use-case than if block-workflow is false, which just checks for individual jobs that are running.

My recommendation is to use the forked orb that specializes on serializing workflows, once my PR there is approved :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

3 participants