1
0
Fork 0
mirror of https://code.forgejo.org/forgejo/runner.git synced 2025-09-15 18:57:01 +00:00
Commit graph

869 commits

Author SHA1 Message Date
Kwonunn
e3adb49c50 functional save and restore through proxy 2025-03-21 13:45:51 +00:00
Kwonunn
95e754c06b integrate the new cache proxy with the server viceice set up 2025-03-21 13:45:51 +00:00
Kwonunn
a6a1df7556 use safe sync.Map 2025-03-21 13:45:51 +00:00
Kwonunn
41032137ea add copyright notice 2025-03-21 13:45:51 +00:00
Kwonunn
d736bb3435 rename workflowid to runid 2025-03-21 13:45:51 +00:00
Kwonunn
ce51735d7a update the reverse proxy to read workflow id and inject new auth info 2025-03-21 13:45:51 +00:00
Kwonunn
f81731e2d9 add CreateWorkflowData 2025-03-21 13:45:51 +00:00
Kwonunn
d92f9305dc wip: begin implementation of new design in proxy 2025-03-21 13:45:51 +00:00
Kwonunn
975364553b fix cache proxy to work properly 2025-03-21 13:45:51 +00:00
Kwonunn
4b5ffd768f implement proxy server 2025-03-21 13:45:51 +00:00
Kwonunn
11006f4ef3 implement hmac generation 2025-03-21 13:45:51 +00:00
Kwonunn
8bc36fb69a create cache proxy based on cache server 2025-03-21 13:45:51 +00:00
Michael Kriese
7458ddfaf4 fix: join org and repo 2025-03-21 13:45:51 +00:00
Michael Kriese
21ca8102fa fix: validate timestamp 2025-03-21 13:45:51 +00:00
Michael Kriese
1082b31367 fix: partial secure cache 2025-03-21 13:45:51 +00:00
earl-warren
ea79e3de41 Merge pull request 'fix: ensure the LXC template does not have obsolete APT' (#102) from earl-warren/act:wip-apt-old into main
Reviewed-on: https://code.forgejo.org/forgejo/act/pulls/102
Reviewed-by: Michael Kriese <michael.kriese@gmx.de>
2025-01-29 10:02:37 +00:00
Earl Warren
4df32aa3df fix: ensure the LXC template does not have obsolete APT
Upgrade to lxc-helper 1.0.1
2025-01-29 10:30:14 +01:00
Earl Warren
50aec4962b chore(upgrade): sync lxc-helpers v1.0.3 2025-01-29 10:30:12 +01:00
Michael Kriese
54fead51c6 fix(jobparser): support workflow_call.inputs and workflow_call.outputs (#70)
- Closes #69
- #45
- https://codeberg.org/forgejo/forgejo/issues/6069

Reviewed-on: https://code.forgejo.org/forgejo/act/pulls/70
Reviewed-by: earl-warren <earl-warren@noreply.code.forgejo.org>
Co-authored-by: Michael Kriese <michael.kriese@visualon.de>
Co-committed-by: Michael Kriese <michael.kriese@visualon.de>
2025-01-29 08:38:30 +00:00
earl-warren
0e99df94b7 Merge pull request 'fix(tests): binds are not sorted' (#97) from earl-warren/act:wip-test into main
Reviewed-on: https://code.forgejo.org/forgejo/act/pulls/97
Reviewed-by: Michael Kriese <michael.kriese@gmx.de>
2025-01-23 16:45:52 +00:00
Earl Warren
e0facd1ee5 fix(tests): binds are not sorted
That creates false negative in test runs. Just keep one, there is no
value in having more.
2025-01-22 22:24:27 +01:00
Earl Warren
d92e4a8aff feat: --hostname is allowed in container options (#95)
It is useful to set an alternative hostname when running a service
such as:

```yaml
services:
  minio:
    image: data.forgejo.org/oci/bitnami/minio:2024.8.17
    options: >-
      --hostname alternate.minio
```

Reviewed-on: https://code.forgejo.org/forgejo/act/pulls/95
Reviewed-by: Kwonunn <kwonunn@noreply.code.forgejo.org>
Co-authored-by: Earl Warren <contact@earl-warren.org>
Co-committed-by: Earl Warren <contact@earl-warren.org>
2025-01-22 18:22:29 +00:00
earl-warren
a8bfb47292 Merge pull request 'fix: do not ignore the config container.options when starting a job' (#92) from earl-warren/act:wip-mount into main
Reviewed-on: https://code.forgejo.org/forgejo/act/pulls/92
Reviewed-by: Michael Kriese <michael.kriese@gmx.de>
2025-01-11 11:01:26 +00:00
Earl Warren
790d1776e7 fix: do not ignore the config container.options when starting a job 2025-01-11 08:45:08 +01:00
Earl Warren
ed911869e1 fix: filter job container options with an allow list
The workflow can only contain the following options for a container:

- --volume
- --tmpfs
2025-01-09 12:10:21 +01:00
Earl Warren
1a77a34726 chore(refactor): split parseOptions out of mergeContainerConfigs 2025-01-09 12:10:21 +01:00
Earl Warren
fc518884f9 chore(refactor): split Options into ConfigOptions & JobOptions
They are both command line options to be parsed as if provided to
docker-run, but they are not to be trusted in the same way.
2025-01-09 12:10:21 +01:00
earl-warren
b03a6b9004 Merge pull request 'feat: Improve logging of error messages' (#90) from vpotyarkin/act:feature/improve-error-logging into main
Reviewed-on: https://code.forgejo.org/forgejo/act/pulls/90
Reviewed-by: earl-warren <earl-warren@noreply.code.forgejo.org>
2025-01-09 10:29:17 +00:00
Vitaliy Potyarkin
591770bf63 refactor: Improve logging of error messages
Logging bare errors might lead to long troubleshooting sessions when error
is not specific enough. This commit adds helpful context messages to
logged errors.

Signed-off-by: Vitaliy Potyarkin <v.potyarkin@yadro.com>
2025-01-09 12:36:30 +03:00
earl-warren
84eca8312d Merge pull request 'feat: export runtime token as FORGEJO_TOKEN' (#88) from xtex/act:forgejo-token-env into main
Reviewed-on: https://code.forgejo.org/forgejo/act/pulls/88
Reviewed-by: Michael Kriese <michael.kriese@gmx.de>
2025-01-05 11:28:57 +00:00
xtex
606d8701ed feat: export runtime token as FORGEJO_TOKEN 2025-01-04 20:01:43 +08:00
earl-warren
cf74c364fb Merge pull request 'chore(lint): fix lint errors' (#84) from earl-warren/act:wip-lint into main
Reviewed-on: https://code.forgejo.org/forgejo/act/pulls/84
2025-01-02 08:50:27 +00:00
Earl Warren
58966f5a8a chore(lint): fix lint errors
- upgrade to golangci-lint@v1.62.2
- make it renovate friendly
- remove most frequent lint check that are not of consequence (unused
  args, etc.)
- fix remaining lint errors
- add renovate custom manager to update the Makefile variable
2024-12-30 21:11:02 +00:00
earl-warren
dc354827a3 Merge pull request 'fix: Do not fail on nil error' (#87) from vpotyarkin/act:fix/nil-error into main
Reviewed-on: https://code.forgejo.org/forgejo/act/pulls/87
Reviewed-by: Michael Kriese <michael.kriese@gmx.de>
2024-12-28 08:02:23 +00:00
Vitaliy Potyarkin
324188e239 fix: Do not fail on nil error
Commit 5a351d33df has introduced a
regression due to which copyDir() would fail after closing the archive
successfully

Signed-off-by: Vitaliy Potyarkin <v.potyarkin@yadro.com>
2024-12-27 17:56:23 +03:00
earl-warren
c3adea9750 Merge pull request 'chore(tests): add ./pkg/container tests' (#86) from earl-warren/act:wip-container-tests into main
Reviewed-on: https://code.forgejo.org/forgejo/act/pulls/86
Reviewed-by: Michael Kriese <michael.kriese@gmx.de>
2024-12-27 11:45:42 +00:00
Earl Warren
07c56a4032 chore(tests): add ./pkg/container tests
remove a failed test verifying exposed port which are not used in the
Forgejo runner anyway
2024-12-27 11:59:35 +01:00
earl-warren
594fd4ffa3 Merge pull request 'fix(cache-server): use consistent uint64' (#68) from fix/cache/use-uint64 into main
Reviewed-on: https://code.forgejo.org/forgejo/act/pulls/68
Reviewed-by: earl-warren <earl-warren@noreply.code.forgejo.org>
2024-11-22 06:57:18 +00:00
Michael Kriese
d8376ed890 fix(cache-server): use consistent uint64 2024-11-22 01:01:12 +01:00
earl-warren
d89433fe3d Merge pull request 'fix: log skipped job and step result as info instead of debug' (#67) from earl-warren/act:wip-runner-test into main
Reviewed-on: https://code.forgejo.org/forgejo/act/pulls/67
Reviewed-by: Michael Kriese <michael.kriese@gmx.de>
2024-11-21 13:25:45 +00:00
Earl Warren
ef243fbf2f fix: log skipped job and step result as info instead of debug
This allows the Forgejo runner to obtain the job result from the
logs even when it is not in debug mode.
2024-11-21 12:18:04 +00:00
Earl Warren
c42fa5f412 fix: [FORGEJO] do not share the act-toolcache volume
In the context of Forgejo the act-toolcache must not be mounted
otherwise independent workflows will race against each other when
writing to it. For instance if a setup-go action is run at the same
time as another, there is a probability that they both write the same
file at the same time, which could lead to a truncated or invalid
content.
2024-11-20 09:42:15 +00:00
earl-warren
3b289cfc24 Merge pull request 'Support overwriting caches' (#60) from wip-artifactcache into main
Reviewed-on: https://code.forgejo.org/forgejo/act/pulls/60
2024-11-11 16:43:23 +00:00
ChristopherHX
017db5edae fix: cache adjust restore order of exact key matches (#2267)
* wip: adjust restore order

* fixup

* add tests

* cleanup

* fix typo

---------

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
(cherry picked from commit 88ac88c5413a430b41d767a942c8e70e778e1d61)
2024-11-07 16:25:40 +01:00
Jason Song
b0c54edc78 Support overwriting caches (#2265)
* feat: support overwrite caches

* test: fix case

* test: fix get_with_multiple_keys

* chore: use atomic.Bool

* test: improve get_with_multiple_keys

* chore: use ping to improve path

* fix: wrong CompareAndSwap

* test: TestHandler_gcCache

* chore: lint code

* chore: lint code

(cherry picked from commit 087b28afc56351b93dd68d7e59a2c8740f6c0e44)
2024-11-07 16:25:26 +01:00
ChristopherHX
4b2554db86 fix: docker buildx cache restore not working (#2236)
* To take effect artifacts v4 pr is needed with adjusted claims

(cherry picked from commit c606759e8c0c2d5036c5bb15d7ec87beca1150cf)
2024-11-07 16:25:15 +01:00
earl-warren
d4566ea157 Merge pull request 'fix: return an error when the argument count is wrong' (#59) from earl-warren/act:wip-arg-count into main
Reviewed-on: https://code.forgejo.org/forgejo/act/pulls/59
Reviewed-by: Michael Kriese <michael.kriese@gmx.de>
2024-10-31 15:34:31 +00:00
Earl Warren
4b5c96dc22 fix: return an error when the argument count is wrong
Closes forgejo/runner#307
2024-10-31 16:02:17 +01:00
earl-warren
672c6a9ded Merge pull request 'fix: debug is leaking host container and network names' (#58) from earl-warren/act:wip-debug into main
Reviewed-on: https://code.forgejo.org/forgejo/act/pulls/58
Reviewed-by: Michael Kriese <michael.kriese@gmx.de>
2024-10-19 08:07:19 +00:00
Earl Warren
d544eb76a8 fix: debug is leaking host container and network names
Closes forgejo/runner#295
2024-10-19 08:48:50 +02:00