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

Self-hosted Windows Runner Fails to Install Python #904

Open
2 of 5 tasks
dnwillia-work opened this issue Jul 4, 2024 · 6 comments
Open
2 of 5 tasks

Self-hosted Windows Runner Fails to Install Python #904

dnwillia-work opened this issue Jul 4, 2024 · 6 comments
Assignees
Labels
bug Something isn't working

Comments

@dnwillia-work
Copy link

dnwillia-work commented Jul 4, 2024

Description:
The action fails to install Python on a Windows 10 self-hosted runner. The following error is encountered:

 C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -NoLogo -Sta -NoProfile -NonInteractive -ExecutionPolicy Unrestricted -Command "$ErrorActionPreference = 'Stop' ; try { Add-Type -AssemblyName System.IO.Compression.FileSystem } catch { } ; if ((Get-Command -Name Expand-Archive -Module Microsoft.PowerShell.Archive -ErrorAction Ignore)) { Expand-Archive -LiteralPath 'D:\ANSYSDev\actions-runner\_work\_temp\14631187-76a2-41c4-a7d1-8e9f15a8ab70' -DestinationPath 'D:\ANSYSDev\actions-runner\_work\_temp\e4873571-c293-4d72-ac71-50341e9e0d70' -Force } else {[System.IO.Compression.ZipFile]::ExtractToDirectory('D:\ANSYSDev\actions-runner\_work\_temp\14631187-76a2-41c4-a7d1-8e9f15a8ab70', 'D:\ANSYSDev\actions-runner\_work\_temp\e4873571-c293-4d72-ac71-50341e9e0d70', $true) }"  
  Expand-Archive :  is not a supported archive file format. .zip is the only supported archive file format.
  At line:1 char:210
  + ...  Ignore)) { Expand-Archive -LiteralPath 'D:\ANSYSDev\actions-runner\_ ...
  +                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      + CategoryInfo          : InvalidArgument: (:String) [Expand-Archive], IOException
      + FullyQualifiedErrorId : NotSupportedArchiveFileExtension,Expand-Archive

This is working on the GitHub windows-latest-8-core runner. It seems setup-python is not the only one impacted. eg:

actions/setup-go#241

I have both Powershell 5.1 and 7.4.3 installed but as you can see the action seems to be picking the former.

Action version:
v5

Platform:

  • Ubuntu
  • macOS
  • Windows

Runner type:

  • Hosted
  • Self-hosted

Tools version:
3.10

Repro steps:
I simply added the following into my CI workflow file and it fails.

      - name: Setup Python
        uses: actions/setup-python@v5
        with:
          python-version: '3.10'

Expected behavior:
Python is downloaded and unzipped, the action works as expected.

Actual behavior:
It's not downloaded and installed.

@dnwillia-work dnwillia-work added bug Something isn't working needs triage labels Jul 4, 2024
@RobPasMue
Copy link

Related to #819

@aparnajyothi-y
Copy link
Contributor

Hello @dnwillia-work, Thank you for creating this issue and we will look into it :)

@dnwillia-work
Copy link
Author

@aparnajyothi-y No problem. @RobPasMue suggested I try v4 as a workaround and I can confirm that this is working.

@priyagupta108
Copy link
Contributor

Hi @dnwillia-work 👋,
We've merged PR #916 into the main branch with a potential fix. Could you please confirm that it works as expected for actions/setup-python@main?

@SMoraisAnsys
Copy link

It just worked on my CICD, see bellow

image

@priyagupta108
Copy link
Contributor

Hi @dnwillia-work 👋,

Just following up to see if you've had a chance to test the fix merged in PR #916 with actions/setup-python@main. Could you please confirm if it resolves the issue?

Thanks!

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

No branches or pull requests

5 participants