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

Fix bugs in rerunning jobs (#29955) #29983

Merged
merged 2 commits into from Mar 22, 2024

Conversation

GiteaBot
Copy link
Contributor

Backport #29955 by @Zettat123

Fix #28761
Fix #27884
Fix #28093

Changes

Rerun all jobs

When rerun all jobs, status of the jobs with needs will be set to blocked instead of waiting. Therefore, these jobs will not run until the required jobs are completed.

Rerun a single job

When a single job is rerun, its dependents should also be rerun, just like GitHub does (#28761 (comment)). In this case, only the specified job will be set to waiting, its dependents will be set to blocked to wait the job.

Show warning if every job has needs

If every job in a workflow has needs, all jobs will be blocked and no job can be run. So I add a warning message.

Fix go-gitea#28761
Fix go-gitea#27884
Fix go-gitea#28093

## Changes

### Rerun all jobs
When rerun all jobs, status of the jobs with `needs` will be set to
`blocked` instead of `waiting`. Therefore, these jobs will not run until
the required jobs are completed.

### Rerun a single job
When a single job is rerun, its dependents should also be rerun, just
like GitHub does
(go-gitea#28761 (comment)).
In this case, only the specified job will be set to `waiting`, its
dependents will be set to `blocked` to wait the job.

### Show warning if every job has `needs`
If every job in a workflow has `needs`, all jobs will be blocked and no
job can be run. So I add a warning message.

<img
src="https://github.com/go-gitea/gitea/assets/15528715/88f43511-2360-465d-be96-ee92b57ff67b"
width="480px" />
@GiteaBot GiteaBot added modifies/go Pull requests that update Go code modifies/translation topic/gitea-actions related to the actions of Gitea type/bug labels Mar 22, 2024
@GiteaBot GiteaBot added this to the 1.21.9 milestone Mar 22, 2024
@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Mar 22, 2024
@GiteaBot GiteaBot requested review from lunny and wolfogre March 22, 2024 03:19
@pull-request-size pull-request-size bot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Mar 22, 2024
@GiteaBot GiteaBot added lgtm/need 1 This PR needs approval from one additional maintainer to be merged. and removed lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. labels Mar 22, 2024
Co-authored-by: Zettat123 <zettat123@gmail.com>
@GiteaBot GiteaBot added lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. and removed lgtm/need 1 This PR needs approval from one additional maintainer to be merged. labels Mar 22, 2024
@lunny lunny added the reviewed/wait-merge This pull request is part of the merge queue. It will be merged soon. label Mar 22, 2024
@lunny lunny enabled auto-merge (squash) March 22, 2024 03:56
@lunny lunny merged commit f91b4dd into go-gitea:release/v1.21 Mar 22, 2024
27 checks passed
@GiteaBot GiteaBot removed the reviewed/wait-merge This pull request is part of the merge queue. It will be merged soon. label Mar 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. modifies/go Pull requests that update Go code modifies/translation size/L Denotes a PR that changes 100-499 lines, ignoring generated files. topic/gitea-actions related to the actions of Gitea type/bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants