setup-python icon indicating copy to clipboard operation
setup-python copied to clipboard

FIX: Extract zip win

Open SMoraisAnsys opened this issue 1 year ago • 6 comments

Description:

Changes consist in reordering extract utils to first attemps ExtractToDirectory and then Expand-Archive. For some reason the download CPython release was not correctly handled by Expand-Archive. This could be happening if the zip file was compressed using an unsupported compression method (e.g. through zip with Unix/Linux).

Related issue: https://github.com/actions/setup-python/issues/819

Check list:

  • [ ] Mark if documentation changes are required.
  • [ ] Mark if tests were added or updated to cover the changes.

SMoraisAnsys avatar Feb 29 '24 23:02 SMoraisAnsys

@priyagupta108 I took the liberty to take a look at #819 and I think this changes should correct the issue. I tested it on my repo and it works fine (didn't do intensive testing though).

SMoraisAnsys avatar Feb 29 '24 23:02 SMoraisAnsys

I took the liberty to reproduce the error (fixed by this PR) on a github runner. The associated branch (https://github.com/SMoraisAnsys/setup-python/tree/test/no-pwshpath) consists in removing a part of the code of function extractZipWin(file, dest) in order to ensure that the runner uses the failing part of the code.

PR that can be used to oversee the changes : https://github.com/SMoraisAnsys/setup-python/pull/1 Failing CI log : https://github.com/SMoraisAnsys/setup-python/actions/runs/8491166206/job/23262896827?pr=1

SMoraisAnsys avatar Mar 30 '24 13:03 SMoraisAnsys

@actions/setup-actions-team could we get this reviewed and merged soon?

RobPasMue avatar Apr 01 '24 05:04 RobPasMue

@aparnajyothi-y pointed out in https://github.com/actions/setup-python/issues/819#issuecomment-2100107374 that this code comes from actions/toolkit. Perhaps a PR against https://github.com/actions/toolkit/blob/main/packages/tool-cache/src/tool-cache.ts would be better reviewed?

jeremyd2019 avatar May 15 '24 23:05 jeremyd2019

@aparnajyothi-y pointed out in #819 (comment) that this code comes from actions/toolkit. Perhaps a PR against https://github.com/actions/toolkit/blob/main/packages/tool-cache/src/tool-cache.ts would be better reviewed?

As you mentioned, the problem seems to be related with actions/toolkit. However, the mentioned PR was created in October 2023. I don't think changes would be better reviewed there.

SMoraisAnsys avatar May 16 '24 09:05 SMoraisAnsys

I hear you, but I think what I meant is that the changes need to be applied there rather than here. Also, I don't think that linked PR would actually help this case.

jeremyd2019 avatar May 16 '24 17:05 jeremyd2019

Closing this since #916 fixed #819 in our CICD.

SMoraisAnsys avatar Aug 08 '24 08:08 SMoraisAnsys