[GH-ISSUE #2419] Stale items in ~/.cache/act/ #1111

Closed
opened 2026-03-01 21:48:59 +03:00 by kerem · 2 comments
Owner

Originally created by @brianjmurrell on GitHub (Aug 7, 2024).
Original GitHub issue: https://github.com/nektos/act/issues/2419

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.

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

Originally created by @brianjmurrell on GitHub (Aug 7, 2024). Original GitHub issue: https://github.com/nektos/act/issues/2419 ### Bug report info ```plain text 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 ```sh 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 ```yml 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 ```sh Again, nothing terribly useful here except to note that the log represents stale code. ``` ### Additional information _No response_
Author
Owner

@ChristopherHX commented on GitHub (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.

<!-- gh-comment-id:2282814122 --> @ChristopherHX commented on GitHub (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.
Author
Owner

@github-actions[bot] commented on GitHub (Mar 26, 2025):

Issue is stale and will be closed in 14 days unless there is new activity

<!-- gh-comment-id:2752814117 --> @github-actions[bot] commented on GitHub (Mar 26, 2025): Issue is stale and will be closed in 14 days unless there is new activity
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
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
starred/act#1111
No description provided.