Skip to content

Support Actions concurrency syntax #32751

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

Draft
wants to merge 29 commits into
base: main
Choose a base branch
from
Draft
Changes from 1 commit
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
d6a95ce
support concurrency
Zettat123 Dec 7, 2024
f713c68
Merge branch 'main' of https://github.com/go-gitea/gitea into pr/Zett…
ChristopherHX Jul 8, 2025
76f58ef
fix: lint
ChristopherHX Jul 8, 2025
249e315
fix: assert correct status code
ChristopherHX Jul 8, 2025
b012126
fix: rerun all jobs did not respect concurrency
ChristopherHX Jul 9, 2025
91fccb7
Fix and Test rerun single jobs
ChristopherHX Jul 9, 2025
2e6032a
Remove CancelJobsByJobConcurrency in PickTask
ChristopherHX Jul 13, 2025
1a08b87
Merge branch 'main' of https://github.com/go-gitea/gitea into pr/Zett…
ChristopherHX Jul 13, 2025
9bba25e
remove code
ChristopherHX Jul 15, 2025
e6d25e2
Merge branch 'main' of https://github.com/go-gitea/gitea into pr/Zett…
ChristopherHX Jul 15, 2025
dc86086
call EmitJobsIfReady when cancelling a run
Zettat123 Jul 19, 2025
8721155
add TestCancelConcurrentRun
Zettat123 Jul 19, 2025
c5444e7
improve concurrency index
Zettat123 Jul 21, 2025
63eaf15
modify cancel-in-progress behavior
Zettat123 Jul 22, 2025
96d6938
fix bugs and tests
Zettat123 Jul 22, 2025
ea2bc92
Merge branch 'main' into support-actions-concurrency
Zettat123 Jul 22, 2025
a4b76b6
update InsertRun
Zettat123 Jul 22, 2025
ca18672
modify cancel-in-progress behavior
Zettat123 Jul 23, 2025
dc003e4
fix lint
Zettat123 Jul 23, 2025
e45ca56
improve handling cancellation
Zettat123 Jul 25, 2025
5e2059a
rename migration
Zettat123 Jul 25, 2025
4ba788d
Merge branch 'main' into support-actions-concurrency
Zettat123 Jul 25, 2025
2481e83
fix migration
Zettat123 Jul 25, 2025
f585f90
remove blockRunByConcurrency todo for jobs
ChristopherHX Jul 25, 2025
5e43aa2
fix migration to use same index as model
ChristopherHX Jul 25, 2025
d5f6c44
implement evaluate concurrency expression again, vars may change afte…
ChristopherHX Jul 25, 2025
796d2c1
Use a single RawConcurrency in db
ChristopherHX Jul 25, 2025
6a9eb9e
fix fmt
ChristopherHX Jul 25, 2025
42c2ca2
add TestAbandonConcurrentRun
Zettat123 Jul 25, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions routers/web/repo/actions/view.go
Original file line number Diff line number Diff line change
Expand Up @@ -602,6 +602,14 @@ func Cancel(ctx *context_module.Context) {

actions_service.CreateCommitStatus(ctx, jobs...)

run, err := actions_model.GetRunByIndex(ctx, ctx.Repo.Repository.ID, runIndex)
if err != nil {
ctx.ServerError("GetRunByIndex", err)
}
if err := actions_service.EmitJobsIfReady(run.ID); err != nil {
log.Error("Emit ready jobs of run %d: %v", run.ID, err)
}

for _, job := range updatedjobs {
_ = job.LoadAttributes(ctx)
notify_service.WorkflowJobStatusUpdate(ctx, job.Run.Repo, job.Run.TriggerUser, job, nil)
Expand Down