question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Running on self-hosted runners leaves files in GITHUB_WORKSPACE

See original GitHub issue

Describe the bug The very first time setup-python is called for a specific version on a self hosted runner, the action will download files into the GITHUB_WORKSPACE and leave them there.

This causes issues for later steps, for instance if I have a step to run linters it runs on the temporary files setup-python downloads.

Which version of the action are you using?

  • v1
  • v2
  • Some other tag (such as v2.0.1 or master)

Environment

  • self-hosted
  • Linux
  • Windows
  • Mac

If applicable, please specify if you’re using a container

Python Versions Please list all of the effected versions of Python (3.8.2, etc.)

To Reproduce

This workflow file run on a self-hosted Ubuntu 18.04 linux server will reproduce:

name: Test setup-python workspace
on: push
jobs:
  test:
    name: Test setup-python
    runs-on: [self-hosted, linux]
    steps:
      - uses: actions/checkout@v2
      - name: before
        run: |
          ls
          ls $GITHUB_WORKSPACE
          du -hc ./
      - name: setup python
        uses: actions/setup-python@v2
        with:
          python-version: 2.7.17
      - name: after
        run: |
          ls
          ls $GITHUB_WORKSPACE
          du -hc ./

After running this you should see a directory with a UUID that adds approximately ~130MB of files to the workspace.

Run/Repo Url If applicable, and if your repo/run is public, please include a URL so it is easier for us to investigate.

Screenshots If applicable, add screenshots to help explain your problem.

Additional context Add any other context about the problem here.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:5
  • Comments:9 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
adamchainzcommented, Jul 22, 2020

@MaksimZhukov That has fixed the issue for me (#117). Thank you!

1reaction
annarailtoncommented, Jul 9, 2020

+1

I’ve had exactly the same issue and it’s caused havoc in pytest test discovery.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Self-hosted runner with Docker step creates files that trip up ...
When using self-hosted runners, git checkouts are cached between runs (this is nice, because it greatly speeds up our builds).
Read more >
Monitoring and troubleshooting self-hosted runners
Checking self-hosted runner network connectivity. Disabling TLS certificate verification. Reviewing the self-hosted runner application log files.
Read more >
About self-hosted runners - GitHub Docs
A self-hosted runner is a system that you deploy and manage to execute jobs from GitHub Actions on GitHub.com. For more information about...
Read more >
Using self-hosted runners in a workflow - GitHub Docs
To specify a self-hosted runner for your job, configure runs-on in your workflow file with self-hosted runner labels. All self-hosted runners have the ......
Read more >
Files created in a container job will be left in the host machine ...
Steps to reproduce the behavior: I have the workflow.yaml file as follows: ... Push code to Github to trigger the self-hosted runner to...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found