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

Add a transaction to pickTask #33543

Merged
merged 5 commits into from
Feb 11, 2025
Merged

Conversation

Zettat123
Copy link
Contributor

In the old pickTask, when getting secrets or variables failed, the task could get stuck in the running status (task status is running but the runner did not fetch the task). To fix this issue, these steps should be in one transaction.

@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Feb 10, 2025
@pull-request-size pull-request-size bot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Feb 10, 2025
@github-actions github-actions bot added modifies/api This PR adds API routes or modifies them modifies/go Pull requests that update Go code labels Feb 10, 2025
@lunny lunny added type/bug backport/v1.23 This PR should be backported to Gitea 1.23 labels Feb 10, 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 Feb 11, 2025
@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 Feb 11, 2025
Copy link
Contributor

@yp05327 yp05327 left a comment

Choose a reason for hiding this comment

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

copyright year should be changed in this case?
IIRC, sometimes this will not be changed in some PRs before? 🤔

@Zettat123
Copy link
Contributor Author

copyright year should be changed in this case? IIRC, sometimes this will not be changed in some PRs before? 🤔

Yes. I think there is no need to change it.
Fixed in bf12fad

@wxiaoguang
Copy link
Contributor

copyright year should be changed in this case? IIRC, sometimes this will not be changed in some PRs before? 🤔

Ship of Theseus https://en.wikipedia.org/wiki/Ship_of_Theseus

(ps: personally I never review the "license header" changes, as long as lint passes, I do not care .......)

@wxiaoguang wxiaoguang merged commit 06f1065 into go-gitea:main Feb 11, 2025
26 checks passed
@GiteaBot GiteaBot added this to the 1.24.0 milestone Feb 11, 2025
@wxiaoguang wxiaoguang deleted the improve-pick-task branch February 11, 2025 16:09
@GiteaBot
Copy link
Collaborator

I was unable to create a backport for 1.23. @Zettat123, please send one manually. 🍵

go run ./contrib/backport 33543
...  // fix git conflicts if any
go run ./contrib/backport --continue

@GiteaBot GiteaBot added the backport/manual No power to the bots! Create your backport yourself! label Feb 11, 2025
lunny pushed a commit to lunny/gitea that referenced this pull request Feb 11, 2025
In the old `pickTask`, when getting secrets or variables failed, the
task could get stuck in the `running` status (task status is `running`
but the runner did not fetch the task). To fix this issue, these steps
should be in one transaction.

---------

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
@lunny lunny added the backport/done All backports for this PR have been created label Feb 11, 2025
zjjhot added a commit to zjjhot/gitea that referenced this pull request Feb 12, 2025
* giteaofficial/main:
  Add a transaction to `pickTask` (go-gitea#33543)
  Fix context usage (go-gitea#33554)
lunny added a commit that referenced this pull request Feb 12, 2025
Backport #33543 

In the old `pickTask`, when getting secrets or variables failed, the
task could get stuck in the `running` status (task status is `running`
but the runner did not fetch the task). To fix this issue, these steps
should be in one transaction.

---------

Co-authored-by: Zettat123 <zettat123@gmail.com>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport/done All backports for this PR have been created backport/manual No power to the bots! Create your backport yourself! backport/v1.23 This PR should be backported to Gitea 1.23 lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. modifies/api This PR adds API routes or modifies them modifies/go Pull requests that update Go code size/L Denotes a PR that changes 100-499 lines, ignoring generated files. type/bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants