1
1
mirror of https://github.com/go-gitea/gitea synced 2024-06-18 09:15:49 +00:00
gitea/models/migrations/v1_21
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
2023-07-24 06:11:27 +00:00
..
main_test.go
v260.go Fix description of drop custom_labels migration (#25243) 2023-06-14 04:46:55 +00:00
v261.go Support configuration variables on Gitea Actions (#24724) 2023-06-20 22:54:15 +00:00
v262.go Support pull_request_target event (#25229) 2023-06-26 14:33:18 +08:00
v263.go Split lfs size from repository size (#22900) 2023-06-28 22:41:02 +00:00
v264.go Sync branches into databases (#22743) 2023-06-29 10:03:20 +00:00
v265.go Actions Artifacts support uploading multiple files and directories (#24874) 2023-07-21 10:42:01 +08:00
v266.go Remove commit status running and warning to align GitHub (#25839) 2023-07-21 16:24:36 +08:00
v267.go Reduce unnecessary DB queries for Actions tasks (#25199) 2023-07-24 06:11:27 +00:00