Skip to content

Conversation

@Zettat123
Copy link
Contributor

Backport #35840

#35783 fixes an actions rerun bug. Due to this bug, some runs may be incorrectly marked as StatusWaiting even though all the jobs are in done status. These runs cannot be run or cancelled. This PR adds a new doctor command to fix the inconsistent run status.

gitea doctor check --run fix-actions-unfinished-run-status --fix

Thanks to @ChristopherHX for the test.

incorrectly marked as `StatusWaiting` even though all the jobs are in
done status. These runs cannot be run or cancelled. This PR adds a new
doctor command to fix the inconsistent run status.

```
gitea doctor check --run fix-actions-unfinished-run-status --fix
```

Thanks to @ChristopherHX  for the test.
@GiteaBot GiteaBot added this to the 1.25.1 milestone Nov 4, 2025
@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Nov 4, 2025
@github-actions github-actions bot added the modifies/go Pull requests that update Go code label Nov 4, 2025
@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 Nov 4, 2025
@lutinglt
Copy link
Contributor

lutinglt commented Nov 4, 2025

Perhaps we should add a timeout period for waiting for scheduling? Marking exceeding the waiting time as an error.

@Zettat123
Copy link
Contributor Author

Perhaps we should add a timeout period for waiting for scheduling? Marking exceeding the waiting time as an error.

We have a cron task to clear jobs that have been in StatusWaiting for a long time.

// CancelAbandonedJobs cancels jobs that have not been picked by any runner for a long time
func CancelAbandonedJobs(ctx context.Context) error {
jobs, err := db.Find[actions_model.ActionRunJob](ctx, actions_model.FindRunJobOptions{
Statuses: []actions_model.Status{actions_model.StatusWaiting, actions_model.StatusBlocked},
UpdatedBefore: timeutil.TimeStampNow().AddDuration(-setting.Actions.AbandonedJobTimeout),
})

But CancelAbandonedJobs doesn't check runs. Maybe we should improve it to make it check runs in StatusWaiting or StatusBlocked status.

@lunny lunny merged commit 61011f1 into go-gitea:release/v1.25 Nov 4, 2025
25 of 26 checks passed
project-mirrors-bot-tu bot pushed a commit to project-mirrors/gitea-helm-chart that referenced this pull request Nov 5, 2025
This PR contains the following updates:

| Package | Update | Change |
|---|---|---|
| [go-gitea/gitea](https://github.com/go-gitea/gitea) | patch | `1.25.0` -> `1.25.1` |

---

### Release Notes

<details>
<summary>go-gitea/gitea (go-gitea/gitea)</summary>

### [`v1.25.1`](https://github.com/go-gitea/gitea/releases/tag/v1.25.1)

[Compare Source](go-gitea/gitea@v1.25.0...v1.25.1)

- BUGFIXES
  - Make ACME email optional ([#&#8203;35849](go-gitea/gitea#35849)) [#&#8203;35857](go-gitea/gitea#35857)
  - Add a doctor command to fix inconsistent run status ([#&#8203;35840](go-gitea/gitea#35840)) ([#&#8203;35845](go-gitea/gitea#35845))
  - Remove wrong code ([#&#8203;35846](go-gitea/gitea#35846))
  - Fix viewed files number is not right if not all files loaded ([#&#8203;35821](go-gitea/gitea#35821)) ([#&#8203;35844](go-gitea/gitea#35844))
  - Fix incorrect pull request counter ([#&#8203;35819](go-gitea/gitea#35819)) ([#&#8203;35841](go-gitea/gitea#35841))
  - Upgrade go mail to 0.7.2 and fix the bug ([#&#8203;35833](go-gitea/gitea#35833)) ([#&#8203;35837](go-gitea/gitea#35837))
  - Revert gomail to v0.7.0 to fix sending mail failed ([#&#8203;35816](go-gitea/gitea#35816)) ([#&#8203;35824](go-gitea/gitea#35824))
  - Fix clone mixed bug ([#&#8203;35810](go-gitea/gitea#35810)) ([#&#8203;35822](go-gitea/gitea#35822))
  - Fix cli "Before" handling ([#&#8203;35797](go-gitea/gitea#35797)) ([#&#8203;35808](go-gitea/gitea#35808))
  - Improve and fix markup code preview rendering ([#&#8203;35777](go-gitea/gitea#35777)) ([#&#8203;35787](go-gitea/gitea#35787))
  - Fix actions rerun bug ([#&#8203;35783](go-gitea/gitea#35783)) ([#&#8203;35784](go-gitea/gitea#35784))
  - Fix actions schedule update issue ([#&#8203;35767](go-gitea/gitea#35767)) ([#&#8203;35774](go-gitea/gitea#35774))
  - Fix circular spin animation direction ([#&#8203;35785](go-gitea/gitea#35785)) ([#&#8203;35823](go-gitea/gitea#35823))
  - Fix file extension on gogs.png ([#&#8203;35793](go-gitea/gitea#35793)) ([#&#8203;35799](go-gitea/gitea#35799))
  - Add pnpm to Snapcraft ([#&#8203;35778](go-gitea/gitea#35778))

Instances on **[Gitea Cloud](https://cloud.gitea.com)** will be automatically upgraded to this version during the specified maintenance window.

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - Between 12:00 AM and 03:59 AM ( * 0-3 * * * ) (UTC).

🚦 **Automerge**: Enabled.

♻ **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box

---

This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0MS4xOC4xIiwidXBkYXRlZEluVmVyIjoiNDEuMTguMSIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOlsia2luZC9kZXBlbmRlbmN5Il19-->

Reviewed-on: https://gitea.com/gitea/helm-gitea/pulls/981
Reviewed-by: Markus Pesch <[email protected]>
Co-authored-by: Renovate Bot <[email protected]>
Co-committed-by: Renovate Bot <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

lgtm/need 1 This PR needs approval from one additional maintainer to be merged. modifies/go Pull requests that update Go code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants