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

All checks show as successful although skipped #28761

Closed
hakito opened this issue Jan 11, 2024 · 3 comments · Fixed by #29955
Closed

All checks show as successful although skipped #28761

hakito opened this issue Jan 11, 2024 · 3 comments · Fixed by #29955
Labels
Milestone

Comments

@hakito
Copy link
Contributor

hakito commented Jan 11, 2024

Description

In a PR all checks show as successful although some of them had been skipped because of an unsuccessful job.

I think it should only show as successful if all jobs were successful.

Gitea Version

1.21.2

Can you reproduce the bug on the Gitea demo site?

No

Log Gist

No response

Screenshots

image

Git Version

No response

Operating System

No response

How are you running Gitea?

Docker

Database

None

@lunny
Copy link
Member

lunny commented Jan 15, 2024

Skipped is not error, so it's successful. This is because commit status has no state of skipped but Gitea Actions have.

@hakito
Copy link
Contributor Author

hakito commented Jan 15, 2024

Ok - but if they have been skipped because of an unsuccessful previous job - they should have the error status (like when they a job is aborted).

Guess I have a preparation job and a test job.

  • The preparation job fails
  • The test job is marked as skipped
  • I manually re-run the preparation job and it runs successfully.

Now the PR is green although test was never executed.

@Zettat123
Copy link
Contributor

Tested a workflow on GitHub. In GitHub, when we re-run a single job, the job's dependents are also re-run.

@lunny lunny added this to the 1.21.9 milestone Mar 22, 2024
lunny pushed a commit that referenced this issue Mar 22, 2024
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.

<img
src="https://github.com/go-gitea/gitea/assets/15528715/88f43511-2360-465d-be96-ee92b57ff67b"
width="480px" />
GiteaBot pushed a commit to GiteaBot/gitea that referenced this issue Mar 22, 2024
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" />
lunny added a commit that referenced this issue Mar 22, 2024
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.

<img
src="https://github.com/go-gitea/gitea/assets/15528715/88f43511-2360-465d-be96-ee92b57ff67b"
width="480px" />

---------

Co-authored-by: Zettat123 <[email protected]>
Co-authored-by: Lunny Xiao <[email protected]>
silverwind pushed a commit to silverwind/gitea that referenced this issue Mar 22, 2024
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" />
DennisRasey pushed a commit to DennisRasey/forgejo that referenced this issue Mar 26, 2024
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
(go-gitea/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" />

(cherry picked from commit 2f060c5834d81f0317c795fc281f9a07e03e5962)
@go-gitea go-gitea locked as resolved and limited conversation to collaborators Jun 20, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants