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

Long post job cleanup #431

Closed
2 of 5 tasks
fat-fellow opened this issue Oct 12, 2023 · 8 comments
Closed
2 of 5 tasks

Long post job cleanup #431

fat-fellow opened this issue Oct 12, 2023 · 8 comments
Assignees
Labels
bug Something isn't working

Comments

@fat-fellow
Copy link

Description:

Post job cleanup.
/Users/user1/actions-runner4/_work/_tool/go/1.[2](https://github.com/anyproto/anytype-heart/actions/runs/6405381199/job/17387801235#step:22:2)0.8/arm64/bin/go env GOMODCACHE
/Users/user1/actions-runner4/_work/_tool/go/1.20.8/arm64/bin/go env GOCACHE
/Users/user1/go/pkg/mod
/Users/user1/Library/Caches/go-build
/opt/homebrew/bin/gtar --posix -cf cache.tzst --exclude cache.tzst -P -C /Users/user1/actions-runner4/_work/anytype-heart/anytype-heart --files-from manifest.txt --delay-directory-restore --use-compress-program zstdmt
Cache Size: ~4154 MB (4[3](https://github.com/anyproto/anytype-heart/actions/runs/6405381199/job/17387801235#step:22:3)55972935 B)
Cache saved successfully
Cache saved with the key: setup-go-macOS-go-1.20.8-c[4](https://github.com/anyproto/anytype-heart/actions/runs/6405381199/job/17387801235#step:22:4)07ea40f2a4ccfa43ee0cec210be[5](https://github.com/anyproto/anytype-heart/actions/runs/6405381199/job/17387801235#step:22:5)4f5c43bcf59aa0faa273[6](https://github.com/anyproto/anytype-heart/actions/runs/6405381199/job/17387801235#step:22:6)d1c1d41f2[9](https://github.com/anyproto/anytype-heart/actions/runs/6405381199/job/17387801235#step:22:9)3f5

Post install action can take 20-30 minutes on our self-hosted mac-mini

Action version:
@ 4

Platform:

  • Ubuntu
  • macOS
  • Windows

Runner type:

  • Hosted
  • Self-hosted

Tools version:
~1.20.8

Repro steps:
https://github.com/anyproto/anytype-heart/actions/runs/6405381199/job/17387801235
Just build the project

Expected behavior:
Fast post install step

Actual behavior:
Long post install step

@fat-fellow fat-fellow added bug Something isn't working needs triage labels Oct 12, 2023
@dusan-trickovic
Copy link
Contributor

Hello, @fat-fellow! Thank you for reporting this issue, we will investigate it and see what can be done :)

@dsame dsame self-assigned this Nov 10, 2023
@dsame
Copy link
Contributor

dsame commented Nov 10, 2023

Hello @fat-fellow, the caching makes little sense on the self-hosted runner because the persists the build state between runs.

I advise to disable the caching:

      - name: Install Go
        uses: actions/setup-go@v4
        with:
          go-version: "~1.20.8"
          cache: false

did it help?

@nixomose
Copy link

I have the same problem, I've run it twice now, one time it skipped the tar process (which is what takes all the time) and one time it did not. I will keep trying it. thanks for the tip.

@dsame
Copy link
Contributor

dsame commented Nov 14, 2023

@nixomose do you have a problem with self-hosted environment as well?

@nixomose
Copy link

yeah, when you run the setup go action on a self hosted linux machine, the cleanup step tars up some go directories and it takes a few seconds.
If you do the exact same thing on a self hosted windows machine, it takes 30+ minutes to do the same tar.
disabling the cache makes that not happen, and the cleanup step takes no time at all, so I lose out on caching, but at least I don't have to wait a half hour for my ci workflow to complete.

@dsame
Copy link
Contributor

dsame commented Nov 14, 2023

@nixomose caching makes little if any sense on self-hosted runner: the intermediate files are preserved between builds and storing/updating them from the network brings no benefits besides increasing the build time.

@nixomose
Copy link

problem solved then. :-)
it is odd that it takes sooooooooooooooo much longer to tar up on windows though.

@dsame
Copy link
Contributor

dsame commented Nov 16, 2023

@nixomose i'm closing the issue because it is solved, but please feel free to reopen it or create a new one in case if the problem appears once again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants