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

ci: disable go cache for self-hosted runner #467

Merged
merged 1 commit into from
Jan 22, 2024
Merged

Conversation

jchappelow
Copy link
Member

@jchappelow jchappelow commented Jan 22, 2024

Apparently self-hosted runners don't require the go caching, and for some reason it can take 20 minutes.

I saw this:

image

I can't explain why that should take so long on bare metal, especially the fast machine we have, but it did. Probably there is a way to tweak the compression program so it uses faster settings or perhaps an uncompressed tar, but according to discussion at actions/setup-go#431 and actions/setup-go#403 that there is no point to using the action's cache on a self-hosted runner.

Thus, this PR sets cache: false for actions/setup-go@v4

Apparently self-hosted runners don't require the go caching, and for
some reason it can take 20 minutes.

This sets `cache: false` for actions/setup-go@v4
@Yaiba
Copy link
Contributor

Yaiba commented Jan 22, 2024

oh, this seems make sense, probably the docker cache is no need as well?

@jchappelow
Copy link
Member Author

oh, this seems make sense, probably the docker cache is no need as well?

I wondered about that, but really don't know.

Related, I see this in the "raw logs":

2024-01-22T17:25:55.7953066Z [command]/usr/bin/tar -xf /home/dev/actions-runner/_work/_temp/6819db30-e6d7-466d-a900-f0b2bc2989b6/cache.tzst -P -C /home/dev/actions-runner/_work/kwil-db/kwil-db --use-compress-program unzstd
2024-01-22T17:25:55.8040313Z /usr/bin/tar: ../../../../../tmp: Cannot mkdir: Permission denied
2024-01-22T17:25:55.8041557Z /usr/bin/tar: ../../../../../tmp/.buildx-cache-kwild: Cannot mkdir: No such file or directory
2024-01-22T17:25:55.8042429Z /usr/bin/tar: ../../../../../tmp: Cannot mkdir: Permission denied
2024-01-22T17:25:55.8043395Z /usr/bin/tar: ../../../../../tmp/.buildx-cache-kwild/blobs: Cannot mkdir: No such file or directory
2024-01-22T17:25:55.8044251Z /usr/bin/tar: ../../../../../tmp: Cannot mkdir: Permission denied
2024-01-22T17:25:55.8045627Z /usr/bin/tar: ../../../../../tmp/.buildx-cache-kwild/blobs/sha256: Cannot mkdir: No such file or directory
2024-01-22T17:25:55.8046527Z /usr/bin/tar: ../../../../../tmp: Cannot mkdir: Permission denied
2024-01-22T17:25:55.8048007Z /usr/bin/tar: ../../../../../tmp/.buildx-cache-kwild/blobs/sha256/bcedd8997b8f4d2b9a73fa2bb971d1c1a50ec0912f742414d87cac851e0dcff1: Cannot open: No such file or directory
2024-01-22T17:25:55.8049264Z /usr/bin/tar: ../../../../../tmp: Cannot mkdir: Permission denied
2024-01-22T17:25:55.8050759Z /usr/bin/tar: ../../../../../tmp/.buildx-cache-kwild/blobs/sha256/31b2241eeb45ffe1344e11159cac14b10f1723bc22376b3b994bb54ba2f99f0f: Cannot open: No such file or directory
2024-01-22T17:25:55.8051977Z /usr/bin/tar: ../../../../../tmp: Cannot mkdir: Permission denied
2024-01-22T17:25:55.8053384Z /usr/bin/tar: ../../../../../tmp/.buildx-cache-kwild/blobs/sha256/75108670441a6326c85a00ac8eb4ba213d2b92d6011539fe28c6648dc7c5929f: Cannot open: No such file or directory
2024-01-22T17:25:55.8054595Z /usr/bin/tar: ../../../../../tmp: Cannot mkdir: Permission denied
2024-01-22T17:25:55.8242565Z /usr/bin/tar: ../../../../../tmp/.buildx-cache-kwild/blobs/sha256/b2d497e8ad304a8a1b972afe48b3d6903286df9e4c569de03b462f853335b97c: Cannot open: No such file or directory
2024-01-22T17:25:55.8243269Z /usr/bin/tar: ../../../../../tmp: Cannot mkdir: Permission denied
2024-01-22T17:25:55.8253665Z /usr/bin/tar: ../../../../../tmp/.buildx-cache-kwild/blobs/sha256/1207c741d8c9b028d98c4006013f9de959da3c55f85b91ed5e4583438a0112ca: Cannot open: No such file or directory
2024-01-22T17:25:55.8254735Z /usr/bin/tar: ../../../../../tmp: Cannot mkdir: Permission denied
2024-01-22T17:25:55.8256034Z /usr/bin/tar: ../../../../../tmp/.buildx-cache-kwild/blobs/sha256/5be51d5976ab8c32955d0141ead34d99e97b344f9da9a8246fd1d3abed8eedd8: Cannot open: No such file or directory
2024-01-22T17:25:55.8257362Z /usr/bin/tar: ../../../../../tmp: Cannot mkdir: Permission denied
2024-01-22T17:25:55.8303974Z /usr/bin/tar: ../../../../../tmp/.buildx-cache-kwild/blobs/sha256/cd62e6ff80fdc0e6f4fc401053ac2a0022251ae8a46112a01010c046af65a3fe: Cannot open: No such file or directory
2024-01-22T17:25:55.8304995Z /usr/bin/tar: ../../../../../tmp: Cannot mkdir: Permission denied
2024-01-22T17:25:55.8306080Z /usr/bin/tar: ../../../../../tmp/.buildx-cache-kwild/blobs/sha256/61c02f63c98d0a453d239e104284661ac714c6ae1816d6a78864b5f0688fb4b4: Cannot open: No such file or directory
2024-01-22T17:25:55.8307009Z /usr/bin/tar: ../../../../../tmp: Cannot mkdir: Permission denied
2024-01-22T17:25:55.8307720Z /usr/bin/tar: ../../../../../tmp/.buildx-cache-kwild/oci-layout: Cannot open: No such file or directory
2024-01-22T17:25:55.8308366Z /usr/bin/tar: ../../../../../tmp: Cannot mkdir: Permission denied
2024-01-22T17:25:55.8309067Z /usr/bin/tar: ../../../../../tmp/.buildx-cache-kwild/index.json: Cannot open: No such file or directory
2024-01-22T17:25:55.8309702Z /usr/bin/tar: ../../../../../tmp: Cannot mkdir: Permission denied
2024-01-22T17:25:55.8310407Z /usr/bin/tar: ../../../../../tmp/.buildx-cache-kwild/ingest: Cannot mkdir: No such file or directory
2024-01-22T17:25:55.8311058Z /usr/bin/tar: Exiting with failure status due to previous errors
2024-01-22T17:25:55.8330360Z ##[warning]Failed to restore: "/usr/bin/tar" failed with error: The process '/usr/bin/tar' failed with exit code 2

https://pipelinesghubeus13.actions.githubusercontent.com/WCvqK0i99OXAJgYHYtdF04gMjdK3yNq93YExAm1NUdrQ9fgJCX/_apis/pipelines/1/runs/2115/signedlogcontent/2?urlExpires=2024-01-22T17%3A38%3A56.6120528Z&urlSigningMethod=HMACV1&urlSignature=eKkcm3Hk7MEDyKng6RVvuD%2FOAD5U8fFupK6Sh7DJ2fA%3D

I wonder if the docker buildx cache isn't working anyway?

@Yaiba
Copy link
Contributor

Yaiba commented Jan 22, 2024

I wonder if the docker buildx cache isn't working anyway?

Not sure, I checked the latest run and I didn't see the error from the raw log.
I guess disable buildx cache should work and be faster, as the local docker engine will cache automically.

@jchappelow
Copy link
Member Author

Re-ran CI a few times and still working. Consistently about 7 minutes. Weird that it's so slow to tar up the cache. Oh well

Copy link
Contributor

@Yaiba Yaiba left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@jchappelow jchappelow merged commit 3d9d804 into main Jan 22, 2024
1 check passed
@jchappelow jchappelow deleted the ci-self-hosted-faster branch January 22, 2024 21:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants