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

Like Git does, act should also ignore the entries in git/info/exclude as well as the ones in ./.gitignore #1000

Closed
mattalxndr opened this issue Feb 14, 2022 · 4 comments · Fixed by #1057
Labels
kind/bug Something isn't working

Comments

@mattalxndr
Copy link

mattalxndr commented Feb 14, 2022

System information

  • Operating System: Arch Linux
  • Architecture: x64 (64-bit)
  • Apple M1: nope
  • Docker version: Docker version 20.10.12, build e91ed5707e
  • Docker image used in act: Digest: sha256:c8897bb05bc79498622123863d4459ce4a585fabc03ec35757b5e008ef6804dd; Status: Image is up to date for ghcr.io/catthehacker/ubuntu:act-latest
  • act version: act version 0.2.25

Expected behaviour

testproj % act pull_request                                                                                       
[Run tests on Pull Request or Push/Run tests] 🚀  Start image=ghcr.io/catthehacker/ubuntu:act-latest
[Run tests on Pull Request or Push/Run tests]   🐳  docker pull image=ghcr.io/catthehacker/ubuntu:act-latest platform= username= forcePull=false
[Run tests on Pull Request or Push/Run tests]   🐳  docker create image=ghcr.io/catthehacker/ubuntu:act-latest platform= entrypoint=["/usr/bin/tail" "-f" "/dev/null"] cmd=[]
[Run tests on Pull Request or Push/Run tests]   🐳  docker run image=ghcr.io/catthehacker/ubuntu:act-latest platform= entrypoint=["/usr/bin/tail" "-f" "/dev/null"] cmd=[]
[Run tests on Pull Request or Push/Run tests]   🐳  docker exec cmd=[mkdir -m 0777 -p /var/run/act] user=root workdir=
[Run tests on Pull Request or Push/Run tests]   🐳  docker cp src=/home/matt/Projects/testproj/. dst=/home/matt/Projects/testproj
[Run tests on Pull Request or Push/Run tests]   🐳  docker exec cmd=[mkdir -p /home/matt/Projects/testproj] user= workdir=
[...]

This is where the process stopped. I expected it would continue until the workflow was finished.

Actual behaviour

I received this error, and the process errored out:

Error: open /home/matt/Projects/testproj/.local/excluded/_tmp/.com.google.Chrome.0NN5Rf/SingletonCookie: no such file or directory

This file caused the process to stop because it's a broken symlink in a remapped /tmp directory that I was using for development.

I didn't expect that it would be trying to access that file, since it's in my .git/info/exclude file, which I expected to be included in the gitignore filters that are used by default to filter files being uploaded to the container.

Workflow and/or repository

This is not applicable to this situation, since it never got to the workflow. To recreate, make a broken symlink in your project directory and ignore it with .git/info/exclude. Then try any workflow and I assume it will happen.

act output

Log
DEBU[0000] Loading environment from /home/matt/Projects/testproj/.env 
DEBU[0000] Loading secrets from /home/matt/Projects/testproj/.secrets
DEBU[0000] Loading workflows from '/home/matt/Projects/testproj/.github/workflows'
DEBU[0000] Loading workflows recursively                
DEBU[0000] Found workflow 'tagged-release.yml' in '/home/matt/Projects/testproj/.github/workflows/tagged-release.yml'
DEBU[0000] Found workflow 'test.yml' in '/home/matt/Projects/testproj/.github/workflows/test.yml'
DEBU[0000] Reading workflow '/home/matt/Projects/testproj/.github/workflows/tagged-release.yml'
DEBU[0000] Correcting if statements '/home/matt/Projects/testproj/.github/workflows/tagged-release.yml'
DEBU[0000] Reading workflow '/home/matt/Projects/testproj/.github/workflows/test.yml'
DEBU[0000] Correcting if statements '/home/matt/Projects/testproj/.github/workflows/test.yml'
DEBU[0000] Planning event: pull_request                 
DEBU[0000] Loading slug from git directory '/home/matt/Projects/testproj/.git'
DEBU[0000] Found revision: a8d08eb3f59d240281ecc1efcb43e6365f0f5496
DEBU[0000] Loading revision from git directory '/home/matt/Projects/testproj/.git'
DEBU[0000] Found revision: a8d08eb3f59d240281ecc1efcb43e6365f0f5496
DEBU[0000] HEAD points to 'a8d08eb3f59d240281ecc1efcb43e6365f0f5496'
DEBU[0000] using github ref: refs/heads/work-karma-up   
DEBU[0000] context env => map[ACT:true]                 
DEBU[0000] context needs => map[]                       
[Run tests on Pull Request or Push/Run tests] 🚀  Start image=ghcr.io/catthehacker/ubuntu:act-latest
DEBU[0000] Loading slug from git directory '/home/matt/Projects/testproj/.git'
DEBU[0000] Found revision: a8d08eb3f59d240281ecc1efcb43e6365f0f5496
DEBU[0000] Loading revision from git directory '/home/matt/Projects/testproj/.git'
DEBU[0000] Found revision: a8d08eb3f59d240281ecc1efcb43e6365f0f5496
DEBU[0000] HEAD points to 'a8d08eb3f59d240281ecc1efcb43e6365f0f5496'
DEBU[0000] using github ref: refs/heads/work-karma-up   
[Run tests on Pull Request or Push/Run tests]   🐳  docker pull image=ghcr.io/catthehacker/ubuntu:act-latest platform= username= forcePull=false
[Run tests on Pull Request or Push/Run tests]   🐳  docker pull ghcr.io/catthehacker/ubuntu:act-latest
DEBU[0000] Image exists? true                           
[Run tests on Pull Request or Push/Run tests] Removed container: b4e35aaf99491f0a5aea90601d2b1741488b0d6a89701ff4d5094005539f3ccb
[Run tests on Pull Request or Push/Run tests]   🐳  docker volume rm act-Run-tests-on-Pull-Request-or-Push-Run-tests
[Run tests on Pull Request or Push/Run tests]   🐳  docker create image=ghcr.io/catthehacker/ubuntu:act-latest platform= entrypoint=["/usr/bin/tail" "-f" "/dev/null"] cmd=[]
[Run tests on Pull Request or Push/Run tests] Created container name=act-Run-tests-on-Pull-Request-or-Push-Run-tests id=3a515cc5ac97debce07bf2c172749afc4989ddf4ba0e5c05c585c234a9e5ff62 from image ghcr.io/catthehacker/ubuntu:act-latest (platform: )
[Run tests on Pull Request or Push/Run tests] ENV ==> [RUNNER_TOOL_CACHE=/opt/hostedtoolcache RUNNER_OS=Linux RUNNER_TEMP=/tmp]
[Run tests on Pull Request or Push/Run tests]   🐳  docker run image=ghcr.io/catthehacker/ubuntu:act-latest platform= entrypoint=["/usr/bin/tail" "-f" "/dev/null"] cmd=[]
[Run tests on Pull Request or Push/Run tests] Starting container: 3a515cc5ac97debce07bf2c172749afc4989ddf4ba0e5c05c585c234a9e5ff62
[Run tests on Pull Request or Push/Run tests] Started container: 3a515cc5ac97debce07bf2c172749afc4989ddf4ba0e5c05c585c234a9e5ff62
[Run tests on Pull Request or Push/Run tests]   🐳  docker exec cmd=[mkdir -m 0777 -p /var/run/act] user=root workdir=
[Run tests on Pull Request or Push/Run tests] Exec command '[mkdir -m 0777 -p /var/run/act]'
[Run tests on Pull Request or Push/Run tests] Working directory '/home/matt/Projects/testproj'
[Run tests on Pull Request or Push/Run tests]   🐳  docker cp src=/home/matt/Projects/testproj/. dst=/home/matt/Projects/testproj
[Run tests on Pull Request or Push/Run tests]   🐳  docker exec cmd=[mkdir -p /home/matt/Projects/testproj] user= workdir=
[Run tests on Pull Request or Push/Run tests] Exec command '[mkdir -p /home/matt/Projects/testproj]'
[Run tests on Pull Request or Push/Run tests] Working directory '/home/matt/Projects/testproj'
DEBU[0000] Writing tarball /tmp/act3709751762 from /home/matt/Projects/testproj/.
DEBU[0000] Stripping prefix:/home/matt/Projects/testproj/ src:/home/matt/Projects/testproj/.
DEBU[0000] open /home/matt/Projects/testproj/.local/excluded/_tmp/.com.google.Chrome.0NN5Rf/SingletonCookie: no such file or directory
DEBU[0000] open /home/matt/Projects/testproj/.local/excluded/_tmp/.com.google.Chrome.0NN5Rf/SingletonCookie: no such file or directory
DEBU[0000] open /home/matt/Projects/testproj/.local/excluded/_tmp/.com.google.Chrome.0NN5Rf/SingletonCookie: no such file or directory
DEBU[0000] open /home/matt/Projects/testproj/.local/excluded/_tmp/.com.google.Chrome.0NN5Rf/SingletonCookie: no such file or directory
DEBU[0000] open /home/matt/Projects/testproj/.local/excluded/_tmp/.com.google.Chrome.0NN5Rf/SingletonCookie: no such file or directory
DEBU[0000] open /home/matt/Projects/testproj/.local/excluded/_tmp/.com.google.Chrome.0NN5Rf/SingletonCookie: no such file or directory
DEBU[0000] open /home/matt/Projects/testproj/.local/excluded/_tmp/.com.google.Chrome.0NN5Rf/SingletonCookie: no such file or directory
DEBU[0000] open /home/matt/Projects/testproj/.local/excluded/_tmp/.com.google.Chrome.0NN5Rf/SingletonCookie: no such file or directory
DEBU[0000] open /home/matt/Projects/testproj/.local/excluded/_tmp/.com.google.Chrome.0NN5Rf/SingletonCookie: no such file or directory
DEBU[0000] Loading slug from git directory '/home/matt/Projects/testproj/.git'
DEBU[0000] Found revision: a8d08eb3f59d240281ecc1efcb43e6365f0f5496
DEBU[0000] Loading revision from git directory '/home/matt/Projects/testproj/.git'
DEBU[0000] Found revision: a8d08eb3f59d240281ecc1efcb43e6365f0f5496
DEBU[0000] HEAD points to 'a8d08eb3f59d240281ecc1efcb43e6365f0f5496'
DEBU[0000] using github ref: refs/heads/work-karma-up   
DEBU[0000] context env => map[ACT:true AGENT_TOOLSDIRECTORY:/opt/hostedtoolcache DEBIAN_FRONTEND:noninteractive DEPLOYMENT_BASEPATH:/opt/runner IMAGE_OS:ubuntu20 ImageOS:ubuntu20 LSB_OS_VERSION:2004 LSB_RELEASE:20.04 PATH:/opt/hostedtoolcache/node/14.19.0/x64/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin RUNNER_USER:root RUN_TOOL_CACHE:/opt/hostedtoolcache USER:root]
DEBU[0000] context needs => map[]                       
Error: open /home/matt/Projects/testproj/.local/excluded/_tmp/.com.google.Chrome.0NN5Rf/SingletonCookie: no such file or directory

By the way, I just found this project and It's already saving me a bunch of time, thanks. :-)

@mattalxndr mattalxndr added the kind/bug Something isn't working label Feb 14, 2022
@mattalxndr mattalxndr changed the title Issue: <shortly describe issue> Like Git does, act should also ignore the entries in git/info/exclude as well as the ones in ./.gitignore Feb 14, 2022
@github-actions
Copy link
Contributor

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

@github-actions github-actions bot added the stale label Mar 17, 2022
@mattalxndr
Copy link
Author

Marco...

@ZauberNerd
Copy link
Contributor

I've found: go-git/go-git#402 which hasn't yet been released (the last release was in June 2021: https://github.com/go-git/go-git/releases/tag/v5.4.2)

@catthehacker
Copy link
Member

we can pin to specific commit

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

Successfully merging a pull request may close this issue.

3 participants