nektos / act

Run your GitHub Actions locally šŸš€
https://nektosact.com
MIT License
52.61k stars 1.31k forks source link

Git Clone failing when running same actions parallely. #1943

Open sahithibanda01 opened 11 months ago

sahithibanda01 commented 11 months ago

Bug report info

act version:            0.2.49
GOOS:                   linux
GOARCH:                 amd64
NumCPU:                 10
Docker host:            DOCKER_HOST environment variable is not set
Sockets found:
    /var/run/docker.sock
    /var/run/podman/podman.sock
Config files:           
Build info:
    Go version:            go1.20.6
    Module path:           github.com/nektos/act
    Main version:          (devel)
    Main path:             github.com/nektos/act
    Main checksum:         
    Build settings:
        -buildmode:           exe
        -compiler:            gc
        -ldflags:             -s -w -X main.version=0.2.49 -X main.commit=d5d854854651c151ecd914bb6e2e370e0057929a -X main.date=2023-08-01T02:21:56Z -X main.builtBy=goreleaser
        CGO_ENABLED:          0
        GOARCH:               amd64
        GOOS:                 linux
        GOAMD64:              v1
        vcs:                  git
        vcs.revision:         d5d854854651c151ecd914bb6e2e370e0057929a
        vcs.time:             2023-08-01T02:21:38Z
        vcs.modified:         false
Docker Engine:
    Engine version:        20.10.18
    Engine runtime:        runc
    Cgroup version:        2
    Cgroup driver:         systemd
    Storage driver:        overlay2
    Registry URI:          https://index.docker.io/v1/
    OS:                    Ubuntu 22.04.1 LTS
    OS type:               linux
    OS version:            22.04
    OS arch:               x86_64
    OS kernel:             5.10.51
    OS CPU:                10
    OS memory:             26070 MB
    Security options:
        name=seccomp,profile=default
        name=cgroupns

Command used with act

act -W workflow.yml -P -self-hosted=-self-hosted -b --detect-event

Describe issue

We are trying to run same github actions in parallel and it is intermitently failing while doing the git clone. Action name: actions/hello-world-javascript-action@v1.1

act -W worflow.yml -P -self-hosted=-self-hosted -b --detect-event
ā˜  git clone 'https://github.com/actions/hello-world-javascript-action' # ref=v1.1
Unable to clone https://github.com/actions/hello-world-javascript-action refs/heads/v1.1: already up-to-date
Job succeeded
Error: already up-to-date

Link to GitHub repository

https://github.com/actions/hello-world-javascript-action

Workflow content

name: github-action
"on": custom
jobs:
  action:
    name: action
    runs-on: -self-hosted
    steps:
    - id: stepId
      uses: actions/hello-world-javascript-action@v1.1
      with:
        who-to-greet: hello-world

Relevant log output

act -W worflow.yml -P -self-hosted=-self-hosted -b --detect-event
ā˜  git clone 'https://github.com/actions/hello-world-javascript-action' # ref=v1.1
Unable to clone https://github.com/actions/hello-world-javascript-action refs/heads/v1.1: already up-to-date
Job succeeded
Error: already up-to-date


### Additional information

_No response_
raghavharness commented 11 months ago

Sometimes we also get this error when running any github action parallely.

Error: empty git-upload-pack given
ChristopherHX commented 11 months ago

I wanted to address this in https://github.com/nektos/act/pull/1913 and followups. To make downloading actions thread safe.

One big problem is getting things merged step by step and getting reviews. Nothing I can do as a single maintainer, my PR's require two approvals from other maintainers however most maintainer disappeared recently and only cplee (owner) can merge anything.

github-actions[bot] commented 5 months ago

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

ChristopherHX commented 5 months ago

Please confirm if the next act release fixes the issue using the feature flag --use-new-action-cache

Note this flag enables a complete rewrite how actions are cloned

I need feedback to know when it's time to make it the new default.

act -W workflow.yml -P -self-hosted=-self-hosted -b --detect-event --use-new-action-cache