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

Stale items in ~/.cache/act/ #2419

Open
brianjmurrell opened this issue Aug 7, 2024 · 1 comment
Open

Stale items in ~/.cache/act/ #2419

brianjmurrell opened this issue Aug 7, 2024 · 1 comment
Labels
confirmed/not-planned Those issues are confirmed, but not planned to be fixed. PR's get reviewed kind/bug Something isn't working

Comments

@brianjmurrell
Copy link

Bug report info

act version:            0.2.65
GOOS:                   linux
GOARCH:                 amd64
NumCPU:                 12
Docker host:            unix:///run/user/1001/podman/podman.sock
Sockets found:
	/var/run/docker.sock(broken)
	$XDG_RUNTIME_DIR/podman/podman.sock
Config files:           
	/home/brian/.config/act/actrc:
		-P ubuntu-latest=catthehacker/ubuntu:act-latest
		-P ubuntu-22.04=catthehacker/ubuntu:act-22.04
		-P ubuntu-20.04=catthehacker/ubuntu:act-20.04
		-P ubuntu-18.04=catthehacker/ubuntu:act-18.04
	/home/brian/.actrc:
		-s GITHUB_TOKEN=[redacted]
		--container-daemon-socket=unix:///run/user/1001/podman/podman.sock
	.actrc:
		-s GITHUB_TOKEN=[redacted]
		--container-daemon-socket=unix:///run/user/1001/podman/podman.sock
Build info:
	Go version:            go1.22.5
	Module path:           github.com/nektos/act
	Main version:          (devel)
	Main path:             github.com/nektos/act
	Main checksum:         
	Build settings:
		-buildmode:           pie
		-compiler:            gc
		-trimpath:            true
		DefaultGODEBUG:       httplaxcontentlength=1,httpmuxgo121=1,tls10server=1,tlsrsakex=1,tlsunsafeekm=1
		CGO_ENABLED:          1
		GOARCH:               amd64
		GOOS:                 linux
		GOAMD64:              v1
Docker Engine:
	Engine version:        5.1.2
	Engine runtime:        crun
	Cgroup version:        2
	Cgroup driver:         systemd
	Storage driver:        overlay
	Registry URI:          
	OS:                    fedora
	OS type:               linux
	OS version:            40
	OS arch:               amd64
	OS kernel:             6.9.6-200.fc40.x86_64
	OS CPU:                12
	OS memory:             63943 MB
	Security options:
		name=seccomp,profile=default
		name=rootless
		name=selinux

Command used with act

act --artifact-server-path=/var/tmp/artifacts --use-new-action-cache=false --pull=false -P self-hosted=-self-hosted -P light=-self-hosted -j <job-name>

Describe issue

I frequently find the output log of act using out of date code. Typically when this happens I simply rm -rf ~/.cache/act/ and it resolves the problem so it seems that there is some cases where stale code in ~/.cache/act/ is not being updated.

Link to GitHub repository

No response

Workflow content

The entire workflow is not really relevant I don't think.  Please correct me if I am wrong.

The part of the workflow where stale code was being used:

      - name: Build RPM Docker image
        id: build-rpm-docker-image
        continue-on-error: true
        run: |
             set -eux
             #cat ${{ inputs.PACKAGING_DIR }}/packaging/Dockerfile.mockbuild
             if "${ACT:-false}" && command -v podman; then
                 DOCKER=podman
             else
                 rpm -qa | grep -e podman -e docker -e moby
                 rpm -qf $(command -v podman)
                 DOCKER=docker
             fi
             pwd
             ls -l
             ls -l packaging || true
             "$DOCKER" build --file ${{ inputs.PACKAGING_DIR }}/packaging/Dockerfile.mockbuild \
                             --build-arg CACHEBUST=$(date +%s%3N)                              \
                             --build-arg CB0=$(date +%V)                                       \
                             --build-arg REPO_FILE_URL=$REPO_FILE_URL                          \
                             --build-arg UID=$(id -u)                                          \
                             --build-arg FVERSION=${{ env.FVERSION }}                          \
                             --tag mock-build                                                  \
                            ${{ inputs.PACKAGING_DIR }}

where the file that was being used from the cache that was stale was the ${{ inputs.PACKAGING_DIR }}/packaging/Dockerfile.mockbuild.

Note that the above is from a reusable workflow called from the workflow that was actually being run to invoke this.

Relevant log output

Again, nothing terribly useful here except to note that the log represents stale code.

Additional information

No response

@brianjmurrell brianjmurrell added the kind/bug Something isn't working label Aug 7, 2024
@ChristopherHX
Copy link
Contributor

ChristopherHX commented Aug 11, 2024

This is well known, for --use-new-action-cache=false / default.

I stopped maintaining the old action cache that you have explicitly enabled in this bug report, because it is inefficient on slow disk and has known race conditions.

If you found a bug with --use-new-action-cache (opt in) I will process the bug report as my free time allows.

@ChristopherHX ChristopherHX added the confirmed/not-planned Those issues are confirmed, but not planned to be fixed. PR's get reviewed label Sep 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
confirmed/not-planned Those issues are confirmed, but not planned to be fixed. PR's get reviewed kind/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants