Skip to content

Conversation

szb640
Copy link
Contributor

@szb640 szb640 commented Sep 18, 2025

What does this Pull Request accomplish?

The nibcq-python project requires a dedicated GitHub agent to run unit tests. When running the setup-poetry action a second time on the agent, the following error is thrown:

ln: failed to create symbolic link 'C:\WINDOWS\ServiceProfiles\NetworkService\.local\poetry\bin/poetry.exe': File exists

This PR addresses the issue, by changing the target directory of the Poetry installation, from a home directory that's shared between runs to a .cache subfolder in the project repository, that is cleaned by GitHub during checkout.

Why should this Pull Request be merged?

This change allows the setup-poetry action to be used on self-hosted runners.

What testing has been done?

Running the pipeline with the changes included produced a passing build:

The pipeline included the following use cases:

  • Ephemeral runners on Linux
  • Self-hosted runners on Windows

Copy link
Collaborator

@mshafer-NI mshafer-NI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change makes sense to me. We did find during our migration to poetry2 that there's another variable where poetry will store things on install (such as any plugins), so we should probably also point that to the runner temp dir.

@bkeryan bkeryan merged commit b7692c2 into ni:main Sep 22, 2025
90 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants