You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
forgejo/models/actions
sillyguodong f5c7d4cfdd
Reduce unnecessary DB queries for Actions tasks (#25199)
Close #24544

Changes:

- Create `action_tasks_version` table to store the latest version of
each scope (global, org and repo).
- When a job with the status of `waiting` is created, the tasks version
of the scopes it belongs to will increase.
- When the status of a job already in the database is updated to
`waiting`, the tasks version of the scopes it belongs to will increase.
- On Gitea side, in `FeatchTask()`, will try to query the
`action_tasks_version` record of the scope of the runner that call
`FetchTask()`. If the record does not exist, will insert a row. Then,
Gitea will compare the version passed from runner to Gitea with the
version in database, if inconsistent, try pick task. Gitea always
returns the latest version from database to the runner.

Related:

- Protocol: https://gitea.com/gitea/actions-proto-def/pulls/10
- Runner: https://gitea.com/gitea/act_runner/pulls/219
1 year ago
..
artifact.go Actions Artifacts support uploading multiple files and directories (#24874) 1 year ago
run.go Reduce unnecessary DB queries for Actions tasks (#25199) 1 year ago
run_job.go Reduce unnecessary DB queries for Actions tasks (#25199) 1 year ago
run_job_list.go Implement actions (#21937) 1 year ago
run_list.go Add actor and status dropdowns to run list (#25118) 1 year ago
runner.go Support changing labels of Actions runner without re-registration (#24806) 1 year ago
runner_list.go Implement actions (#21937) 1 year ago
runner_token.go Implement actions (#21937) 1 year ago
status.go Require approval to run actions for fork pull request (#22803) 1 year ago
task.go Reduce unnecessary DB queries for Actions tasks (#25199) 1 year ago
task_list.go Implement actions (#21937) 1 year ago
task_output.go Support upload `outputs` and use `needs` context on Actions (#24230) 1 year ago
task_step.go Implement actions (#21937) 1 year ago
tasks_version.go Reduce unnecessary DB queries for Actions tasks (#25199) 1 year ago
utils.go Implement actions (#21937) 1 year ago
utils_test.go Implement actions (#21937) 1 year ago
variable.go Support configuration variables on Gitea Actions (#24724) 1 year ago