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

Adding support for waiting on specific job/step completion in turnstyle #98

Merged

Conversation

selecsosi
Copy link
Contributor

This PR adds in support for two new input fields:

  • job-to-wait-for
  • step-to-wait-for

The idea of these new inputs allows the turnstyle waiter to examin a previous run's jobs->steps and allows for more granular control of what phase of the workflow to wait on.

The use case of this is my company currently needs to split our deployment workflow (gitops commit + argocd sync) across two workflows as we want to make sure the gitops commit runs sequentally. Using a turnstyle at the workflow level means that a subsequent sync from argo would delay the next workflow execution until the subsequent job/steps complete.

This PR updates the waiter to, if a previous run is found, and the above inputs are set, make subsequent requests to the ghAPI and check to see if the desired job/step is has finished executing

This PR adds in support for two new input fields:
* job-to-wait-for
* step-to-wait-for

The idea of these new inputs allows the turnstyle waiter to examin a
previous run's jobs->steps and allows for more granular control of what
phase of the workflow to wait on.

The use case of this is my company currently needs to split our
deployment workflow (gitops commit + argocd sync) across two workflows
as we want to make sure the gitops commit runs sequentally. Using a
turnstyle at the workflow level means that a subsequent sync from argo
would delay the next workflow execution until the subsequent job/steps
complete.

This PR updates the waiter to, if a previous run is found, and the above
inputs are set, make subsequent requests to the ghAPI and check to see
if the desired job/step is has finished executing
@selecsosi selecsosi force-pushed the selecsosi/add-job-and-step-to-wait-for branch from 56f8d08 to 425bf1c Compare December 14, 2024 21:58
Copy link
Collaborator

@chenrui333 chenrui333 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@chenrui333 chenrui333 merged commit 30a2cbb into softprops:master Dec 18, 2024
2 checks passed
@chenrui333
Copy link
Collaborator

@selecsosi thanks a lot for your efforts on this!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants