feat: use hashed uses string as cache dir name #186

Merged
earl-warren merged 1 commit from earl-warren/act:wip-cache into main 2025-07-21 21:08:46 +00:00
Contributor
Port of https://gitea.com/gitea/act/pulls/117 Refs forgejo/act#100
earl-warren changed title from feat: use hashed uses string as cache dir name [skip cascade] to feat: use hashed uses string as cache dir name 2025-07-16 10:23:23 +00:00
earl-warren force-pushed wip-cache from e7fe6e6506
All checks were successful
/ cascade (pull_request_target) Has been skipped
checks / unit (pull_request) Successful in 3m16s
checks / integration (pull_request) Successful in 2m26s
to 3d24c010bc
Some checks failed
checks / unit (pull_request) Successful in 4m50s
checks / integration (pull_request) Successful in 3m8s
/ cascade (pull_request_target) Failing after 12m49s
2025-07-16 10:23:29 +00:00
Compare
Contributor

cascading-pr updated at forgejo/runner#713

cascading-pr updated at https://code.forgejo.org/forgejo/runner/pulls/713
viceice approved these changes 2025-07-16 11:21:37 +00:00
viceice left a comment
Owner

we probably should drop safeFilename and always use hashed folders?

we probably should drop `safeFilename` and always use hashed folders?
Owner
# runner.forgejo.org/internal/app/run
internal/app/run/workflow.go:18:38: not enough arguments in call to model.ReadWorkflow
	have (*bytes.Reader)
	want (io.Reader, bool)
# runner.forgejo.org/internal/app/run
# [runner.forgejo.org/internal/app/run]
vet: internal/app/run/workflow.go:18:75: not enough arguments in call to model.ReadWorkflow
	have (*bytes.Reader)
	want (io.Reader, bool)
make: *** [Makefile:114: vet] Error 1

https://code.forgejo.org/forgejo/runner/actions/runs/4759/jobs/0#jobstep-4-92

``` # runner.forgejo.org/internal/app/run internal/app/run/workflow.go:18:38: not enough arguments in call to model.ReadWorkflow have (*bytes.Reader) want (io.Reader, bool) # runner.forgejo.org/internal/app/run # [runner.forgejo.org/internal/app/run] vet: internal/app/run/workflow.go:18:75: not enough arguments in call to model.ReadWorkflow have (*bytes.Reader) want (io.Reader, bool) make: *** [Makefile:114: vet] Error 1 ``` https://code.forgejo.org/forgejo/runner/actions/runs/4759/jobs/0#jobstep-4-92
Author
Contributor

I will re-push once forgejo/runner#714 lands, until then it blocks cascades.

I will re-push once https://code.forgejo.org/forgejo/runner/pulls/714 lands, until then it blocks cascades.
Author
Contributor

@viceice wrote in #186 (comment):

we probably should drop safeFilename and always use hashed folders?

It is still used in the code dealing with re-usable workflows. This code needs work but it is a new feature as it does not work yet in Forgejo. And the change is not trivial.

@viceice wrote in https://code.forgejo.org/forgejo/act/pulls/186#issuecomment-47754: > we probably should drop `safeFilename` and always use hashed folders? It is still used in the code dealing with re-usable workflows. This code needs work but it is a new feature as it does not work yet in Forgejo. And the change is not trivial.
Owner

@earl-warren wrote in #186 (comment):

@viceice wrote in #186 (comment):

we probably should drop safeFilename and always use hashed folders?

It is still used in the code dealing with re-usable workflows. This code needs work but it is a new feature as it does not work yet in Forgejo. And the change is not trivial.

i know. it was ment to remeber to do that

@earl-warren wrote in https://code.forgejo.org/forgejo/act/pulls/186#issuecomment-47784: > @viceice wrote in #186 (comment): > > > we probably should drop `safeFilename` and always use hashed folders? > > It is still used in the code dealing with re-usable workflows. This code needs work but it is a new feature as it does not work yet in Forgejo. And the change is not trivial. i know. it was ment to remeber to do that
Contributor

cascading-pr updated at forgejo/runner#715

cascading-pr updated at https://code.forgejo.org/forgejo/runner/pulls/715
earl-warren scheduled this pull request to auto merge when all checks succeed 2025-07-16 16:16:22 +00:00
Contributor

cascading-pr updated at forgejo/runner#715

cascading-pr updated at https://code.forgejo.org/forgejo/runner/pulls/715
earl-warren force-pushed wip-cache from 3d24c010bc
Some checks failed
checks / unit (pull_request) Successful in 4m50s
checks / integration (pull_request) Successful in 3m8s
/ cascade (pull_request_target) Failing after 12m49s
to 68a435ef0a
Some checks failed
checks / unit (pull_request) Successful in 2m19s
checks / integration (pull_request) Successful in 2m18s
/ cascade (pull_request_target) Failing after 26s
2025-07-21 16:03:41 +00:00
Compare
Contributor

cascading-pr updated at forgejo/runner#719

cascading-pr updated at https://code.forgejo.org/forgejo/runner/pulls/719
Author
Contributor
forgejo-runner.log:[/test]   ✅  Success - Main FORGEJO_ACTION_REPOSITORY
forgejo-runner.log:[/test] ⭐ Run Main FORGEJO_ACTION_PATH
forgejo-runner.log:[/test]   🐳  docker exec cmd=[bash --noprofile --norc -e -o pipefail /var/run/act/workflow/3-composite-1.sh] user= workdir=
forgejo-runner.log:[/test]   | + [[ /var/run/act/actions/d3/94353f2e76d50c5b7adfe573adfbd278faec6560412537b2e63a3bb880f5ce =~ action-for-context@main$ ]]
forgejo-runner.log:[/test]   ❌  Failure - Main FORGEJO_ACTION_PATH
forgejo-runner.log:[/test] exitcode '1': failure

The end-to-end assumptions have to be modified.

``` forgejo-runner.log:[/test] ✅ Success - Main FORGEJO_ACTION_REPOSITORY forgejo-runner.log:[/test] ⭐ Run Main FORGEJO_ACTION_PATH forgejo-runner.log:[/test] 🐳 docker exec cmd=[bash --noprofile --norc -e -o pipefail /var/run/act/workflow/3-composite-1.sh] user= workdir= forgejo-runner.log:[/test] | + [[ /var/run/act/actions/d3/94353f2e76d50c5b7adfe573adfbd278faec6560412537b2e63a3bb880f5ce =~ action-for-context@main$ ]] forgejo-runner.log:[/test] ❌ Failure - Main FORGEJO_ACTION_PATH forgejo-runner.log:[/test] exitcode '1': failure ``` The end-to-end assumptions have to be modified.
Author
Contributor

Waiting on forgejo/end-to-end#823 to be merged to change end-to-end testing assumptions on the forgejo action path.

Waiting on https://code.forgejo.org/forgejo/end-to-end/pulls/823 to be merged to change end-to-end testing assumptions on the forgejo action path.
Contributor

cascading-pr updated at forgejo/runner#719

cascading-pr updated at https://code.forgejo.org/forgejo/runner/pulls/719
earl-warren deleted branch wip-cache 2025-07-21 21:08:46 +00:00
Commenting is not possible because the repository is archived.
No reviewers
No milestone
No project
No assignees
3 participants
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
forgejo/act!186
No description provided.