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

Make runs-on support variable expression #29468

Merged
merged 8 commits into from
Mar 8, 2024

Conversation

sillyguodong
Copy link
Contributor

@sillyguodong sillyguodong commented Feb 28, 2024

As title.
Close issue: https://gitea.com/gitea/act_runner/issues/445
Follow: https://gitea.com/gitea/act/pulls/91

Move getSecretsOfTask and getVariablesOfTask under models because of circular dependency issues.

@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Feb 28, 2024
@pull-request-size pull-request-size bot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Feb 28, 2024
@github-actions github-actions bot added the modifies/api This PR adds API routes or modifies them label Feb 28, 2024
@sillyguodong sillyguodong added the topic/gitea-actions related to the actions of Gitea label Feb 28, 2024
modules/actions/utils.go Outdated Show resolved Hide resolved
@GiteaBot GiteaBot added lgtm/blocked A maintainer has reservations with the PR and thus it cannot be merged and removed lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. labels Feb 28, 2024
services/actions/utils.go Outdated Show resolved Hide resolved
services/actions/utils.go Outdated Show resolved Hide resolved
@sillyguodong sillyguodong marked this pull request as ready for review March 1, 2024 06:28
@sillyguodong sillyguodong changed the title WIP: Make runs-on support variable expression Make runs-on support variable expression Mar 1, 2024
TKaxv-7S pushed a commit to TKaxv-7S/gitea-act that referenced this pull request Mar 1, 2024
Partial implementation of https://gitea.com/gitea/act_runner/issues/445, the Gitea side also needs a PR for the entire functionality.
Gitea side: go-gitea/gitea#29468

Co-authored-by: Jason Song <[email protected]>
Reviewed-on: https://gitea.com/gitea/act/pulls/91
Reviewed-by: Jason Song <[email protected]>
Co-authored-by: sillyguodong <[email protected]>
Co-committed-by: sillyguodong <[email protected]>
@lunny lunny added type/bug backport/v1.21 This PR should be backported to Gitea 1.21 labels Mar 4, 2024
@sillyguodong
Copy link
Contributor Author

@KN4CK3R I have addressed the requested changes in the PR. Could you please re-review it? Thank you!

@GiteaBot GiteaBot added lgtm/need 1 This PR needs approval from one additional maintainer to be merged. and removed lgtm/blocked A maintainer has reservations with the PR and thus it cannot be merged labels Mar 8, 2024
@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 Mar 8, 2024
@lunny lunny added the reviewed/wait-merge This pull request is part of the merge queue. It will be merged soon. label Mar 8, 2024
@lunny lunny enabled auto-merge (squash) March 8, 2024 05:35
@lunny lunny merged commit a1f5dd7 into go-gitea:main Mar 8, 2024
26 checks passed
@GiteaBot GiteaBot added this to the 1.23.0 milestone Mar 8, 2024
@GiteaBot
Copy link
Contributor

GiteaBot commented Mar 8, 2024

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

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

@GiteaBot GiteaBot added backport/manual No power to the bots! Create your backport yourself! and removed reviewed/wait-merge This pull request is part of the merge queue. It will be merged soon. labels Mar 8, 2024
@lunny lunny modified the milestones: 1.23.0, 1.22.0 Mar 8, 2024
zjjhot added a commit to zjjhot/gitea that referenced this pull request Mar 8, 2024
* giteaofficial/main:
  Add cache for branch divergence on branch list page (go-gitea#29577)
  Fix user-defined markup links targets (go-gitea#29305)
  Don't show AbortErrors on logout (go-gitea#29639)
  Style fomantic grey labels (go-gitea#29458)
  Don't use `<br />` in alert block (go-gitea#29650)
  Fix incorrect rendering csv file when file size is larger than UI.CSV.MaxFileSize (go-gitea#29653)
  Set user's 24h preference from their current OS locale (go-gitea#29651)
  Move get/set default branch from git package to gitrepo package to hide repopath (go-gitea#29126)
  Make runs-on support variable expression (go-gitea#29468)
lunny pushed a commit that referenced this pull request Mar 14, 2024
backport #29468 

Close issue: https://gitea.com/gitea/act_runner/issues/445
Follow: https://gitea.com/gitea/act/pulls/91

Move `getSecretsOfTask` and `getVariablesOfTask` under models because of
circular dependency issues.
@lunny lunny added the backport/done All backports for this PR have been created label Mar 15, 2024
TKaxv-7S pushed a commit to TKaxv-7S/gitea-act that referenced this pull request Mar 25, 2024
Partial implementation of https://gitea.com/gitea/act_runner/issues/445, the Gitea side also needs a PR for the entire functionality.
Gitea side: go-gitea/gitea#29468

Co-authored-by: Jason Song <[email protected]>
Reviewed-on: https://gitea.com/gitea/act/pulls/91
Reviewed-by: Jason Song <[email protected]>
Co-authored-by: sillyguodong <[email protected]>
Co-committed-by: sillyguodong <[email protected]>
@wolfogre wolfogre mentioned this pull request Apr 11, 2024
wolfogre added a commit that referenced this pull request Apr 11, 2024
Fix #30361, regression of #29782 which is a backport, not the original
#29468.

#29468 did a small refactor which introduced a new function
`GetVariablesOfRun`. However, it's designed for v1.22 which supports
global variables.

After backporting it to v1.21, it will still try to get global
variables, which causes it to retrieve all variables.
silverwind pushed a commit that referenced this pull request Apr 23, 2024
Follow #29468
1. Interpolate runs-on with variables when scheduling tasks.
2. The `GetVariablesOfRun` function will check if the `Repo` of the run
is nil.

---------

Co-authored-by: Giteabot <[email protected]>
sillyguodong added a commit to sillyguodong/gitea that referenced this pull request Apr 24, 2024
)

Follow go-gitea#29468
1. Interpolate runs-on with variables when scheduling tasks.
2. The `GetVariablesOfRun` function will check if the `Repo` of the run
is nil.

---------

Co-authored-by: Giteabot <[email protected]>
@go-gitea go-gitea locked as resolved and limited conversation to collaborators Jun 6, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
backport/done All backports for this PR have been created backport/manual No power to the bots! Create your backport yourself! backport/v1.21 This PR should be backported to Gitea 1.21 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 size/L Denotes a PR that changes 100-499 lines, ignoring generated files. topic/gitea-actions related to the actions of Gitea type/bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants