Skip to content

Support Actions concurrency syntax#32751

Merged
lunny merged 62 commits into
go-gitea:mainfrom
Zettat123:support-actions-concurrency
Oct 10, 2025
Merged

Support Actions concurrency syntax#32751
lunny merged 62 commits into
go-gitea:mainfrom
Zettat123:support-actions-concurrency

Conversation

@Zettat123
Copy link
Copy Markdown
Contributor

@Zettat123 Zettat123 commented Dec 7, 2024

Fix #24769
Fix #32662
Fix #33260

Depends on https://gitea.com/gitea/act/pulls/124

⚠️ BREAKING ⚠️

This PR removes the auto-cancellation feature added by #25716. Users need to manually add concurrency to workflows to control concurrent workflows or jobs.

@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Dec 7, 2024
@Zettat123 Zettat123 force-pushed the support-actions-concurrency branch from 3551677 to fcf4517 Compare December 10, 2024 08:56
@lunny lunny added this to the 1.24.0 milestone Dec 16, 2024
@Zettat123 Zettat123 force-pushed the support-actions-concurrency branch from 52833e7 to 130f2a2 Compare December 17, 2024 01:49
@Zettat123 Zettat123 force-pushed the support-actions-concurrency branch 3 times, most recently from 461c7c1 to d5168a2 Compare January 6, 2025 06:16
@Zettat123 Zettat123 force-pushed the support-actions-concurrency branch from e038ed2 to f77f266 Compare January 10, 2025 06:00
@Zettat123 Zettat123 changed the title WIP: Support concurrency for Actions WIP: Support Actions concurrency syntax Jan 15, 2025
@Zettat123 Zettat123 force-pushed the support-actions-concurrency branch from ad71599 to 8f5948b Compare January 15, 2025 03:03
@Zettat123

This comment was marked as resolved.

wxiaoguang added a commit that referenced this pull request Jan 15, 2025
)

Move the main logic of `generateTaskContext` and `findTaskNeeds` to the
`services` layer.

This is a part of #32751, since we need the git context and `needs` to
parse the concurrency expressions.

---------

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
@wxiaoguang wxiaoguang added the type/feature Completely new functionality. Can only be merged if feature freeze is not active. label Oct 10, 2025
Comment thread routers/web/repo/actions/view.go Outdated
Comment thread routers/web/repo/actions/view.go Outdated
@wxiaoguang
Copy link
Copy Markdown
Contributor

I have no more questions. If the new changes look good, feel free to merge. Thank you all.

@Clindbergh
Copy link
Copy Markdown

@lunny Are there any considerations to backport this PR to 1.25 ? Thanks.

@ChristopherHX
Copy link
Copy Markdown
Contributor

IMO This is too large for backporting and changes the database structure

@Clindbergh
Copy link
Copy Markdown

IMO This is too large for backporting and changes the database structure

Thanks for the response.

Did 1.25.1 or earlier versions introduce any other setting or feature that would enable new workarounds to avoid ongoing pipelines being cancelled by new pushes? Ideally the jobs would queue, the concurrency syntax feature is secondary to me.

@wxiaoguang
Copy link
Copy Markdown
Contributor

1.25 won't get large changes.

I think you can use the main-nightly, it should be stable enough for daily usage. And any bug will be fixed in first time.

@jpdsc
Copy link
Copy Markdown

jpdsc commented Nov 27, 2025

When can we expect this to be released? As mentioned, 1.2X release isn't going to happen due to the changes needed. However, as it is merged, where can I see for which release it's planned?

@TheFox0x7
Copy link
Copy Markdown
Contributor

It's in the linked milestone

@silverwind
Copy link
Copy Markdown
Member

When can we expect this to be released? As mentioned, 1.2X release isn't going to happen due to the changes needed. However, as it is merged, where can I see for which release it's planned?

No guarantees but, 1.26 should happen rather soonish, maybe a few more weeks.

Comment on lines +18 to +26
if _, err := x.SyncWithOptions(xorm.SyncOptions{
IgnoreDropIndices: true,
}, new(ActionRun)); err != nil {
return err
}

if err := x.Sync(new(ActionRun)); err != nil {
return err
}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Why SyncWithOptions then Sync? Bug?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. pr/breaking Merging this PR means builds will break. Needs a description what exactly breaks, and how to fix it! type/feature Completely new functionality. Can only be merged if feature freeze is not active.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

workflow_dispatch allows only one job in a branch [Actions] Opt-out from auto-cancellation [Actions] Support concurrency syntax