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

Support Actions concurrency syntax #32751

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Zettat123
Copy link
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
@pull-request-size pull-request-size bot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Dec 7, 2024
@github-actions github-actions bot added modifies/api This PR adds API routes or modifies them modifies/go Pull requests that update Go code modifies/migrations modifies/dependencies labels Dec 7, 2024
@Zettat123 Zettat123 force-pushed the support-actions-concurrency branch from 3551677 to fcf4517 Compare December 10, 2024 08:56
@pull-request-size pull-request-size bot added size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. and removed size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Dec 12, 2024
@lunny lunny added this to the 1.24.0 milestone Dec 16, 2024
@pull-request-size pull-request-size bot added size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. and removed size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. labels Dec 16, 2024
@Zettat123 Zettat123 force-pushed the support-actions-concurrency branch from 52833e7 to 130f2a2 Compare December 17, 2024 01:49
@pull-request-size pull-request-size bot added size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. and removed size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. labels Dec 17, 2024
@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 <[email protected]>
Co-authored-by: wxiaoguang <[email protected]>
@Zettat123 Zettat123 force-pushed the support-actions-concurrency branch 2 times, most recently from 87a79d9 to eb43091 Compare January 16, 2025 02:09
@github-actions github-actions bot removed the modifies/api This PR adds API routes or modifies them label Jan 16, 2025
@Zettat123 Zettat123 force-pushed the support-actions-concurrency branch 2 times, most recently from 19d3dcb to 93af0ee Compare January 24, 2025 09:41
project-mirrors-bot-tu bot pushed a commit to project-mirrors/forgejo-as-gitea-fork that referenced this pull request Jan 26, 2025
…gitea#33280)

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

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

---------

Co-authored-by: Lunny Xiao <[email protected]>
Co-authored-by: wxiaoguang <[email protected]>
(cherry picked from commit d0962ce)

Conflicts:
	routers/api/actions/runner/main_test.go
	routers/api/actions/runner/utils.go
	services/actions/context_test.go
	services/actions/init_test.go
	tests/integration/actions_job_test.go
  simple conflicts related to

  ref_type":          string(refName.RefType()),                            // string, The type of ref that triggered the workflow run. Valid values are branch or tag.

  Use env GITEA_RUNNER_REGISTRATION_TOKEN as global runner token (go-gitea#32946)
@Zettat123 Zettat123 force-pushed the support-actions-concurrency branch 2 times, most recently from a1d070c to c433843 Compare February 8, 2025 02:09
@Zettat123 Zettat123 marked this pull request as ready for review February 8, 2025 02:29
@Zettat123 Zettat123 changed the title WIP: Support Actions concurrency syntax Support Actions concurrency syntax Feb 8, 2025
@Zettat123
Copy link
Contributor Author

This PR is ready for review. Please also review https://gitea.com/gitea/act/pulls/124 .

@lunny lunny added the pr/breaking Merging this PR means builds will break. Needs a description what exactly breaks, and how to fix it! label Feb 8, 2025
@Zettat123 Zettat123 force-pushed the support-actions-concurrency branch from c433843 to 7b27a42 Compare February 11, 2025 03:27
@Zettat123 Zettat123 force-pushed the support-actions-concurrency branch from 3263d4e to 85baf37 Compare February 11, 2025 07:03
chhe pushed a commit to chhe/act that referenced this pull request Feb 12, 2025
To support `concurrency` syntax for Gitea Actions

Gitea PR: go-gitea/gitea#32751

Reviewed-on: https://gitea.com/gitea/act/pulls/124
Reviewed-by: Lunny Xiao <[email protected]>
Co-authored-by: Zettat123 <[email protected]>
Co-committed-by: Zettat123 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. modifies/dependencies modifies/go Pull requests that update Go code modifies/migrations pr/breaking Merging this PR means builds will break. Needs a description what exactly breaks, and how to fix it! size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.
Projects
None yet
3 participants