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

Jobs stuck when trying to untar an archive #282

Closed
eine opened this issue Jan 16, 2020 · 19 comments
Closed

Jobs stuck when trying to untar an archive #282

eine opened this issue Jan 16, 2020 · 19 comments
Assignees
Labels
awaiting-deployment Code complete; awaiting deployment and/or deployment in progress bug Something isn't working

Comments

@eine
Copy link

eine commented Jan 16, 2020

Since today, trying to untar a tar.xz archive on windows-latest seems not to be possible:

/cc @ericsciple

@bryanmacfarlane
Copy link
Member

Moving to virtual-environments since VM changes broke this.

@bryanmacfarlane bryanmacfarlane transferred this issue from actions/toolkit Jan 16, 2020
@thboop
Copy link

thboop commented Jan 16, 2020

Related to #263

@thejoebourneidentity
Copy link
Contributor

@alepauly can you verify that this is fixed? ty!

@eine
Copy link
Author

eine commented Jan 30, 2020

@thechrisjohnson, the MWEs above are still failing/stuck: https://github.com/eine/setup-msys2/runs/417809983

@miketimofeev
Copy link
Contributor

@thejoebourneidentity @eine the issue is already fixed, but the VM image is not deployed yet. It should be available in a week or two.

@miketimofeev miketimofeev added the awaiting-deployment Code complete; awaiting deployment and/or deployment in progress label Jan 31, 2020
@miketimofeev
Copy link
Contributor

@eine the image has been deployed. Could you check the behavior, please?

@eine
Copy link
Author

eine commented Feb 13, 2020

@miketimofeev I restarted an old job, and I also pushed some new. In all cases, runs are still stuck:

@miketimofeev
Copy link
Contributor

miketimofeev commented Feb 14, 2020

@eine thanks for the update, we will continue the investigation

@miketimofeev miketimofeev self-assigned this Feb 14, 2020
@miketimofeev
Copy link
Contributor

@eine I'm able to reproduce it. Could you give an example of a successful build with untar?

@eine
Copy link
Author

eine commented Feb 14, 2020

@eine I'm able to reproduce it. Could you give an example of a successful build with untar?

I'm not sure I understand what you mean. The following commit shows what was used in setup-msys2 before something broke upstream, and how it was fixed using 7z instead: numworks/setup-msys2@b3452aa Then, I tried all the examples above, none of which did work. Is using untar different from any of those?

Note that I am ok with using 7z. Furthermore, I hope #342 to be merged soon. Therefore, I don't have any actual build where I need to use tar or untar.

@miketimofeev
Copy link
Contributor

@eine sorry for confusing, I mean successful setup-msys2 with tar -xJf. But it looks like we've already found the root cause - default windows tar.exe(C:\windows\system32\tar.exe) is used instead of tar comes along with Git and that "Windows tar" can't extract from such xz archives. We're working on getting back Git tar.exe to PATH.

@eine
Copy link
Author

eine commented Feb 17, 2020

@miketimofeev, please, note that this is not the first chapter in the series of "conflicts between multiple installed versions of tar". I do think that the decision to make BSD's tar the default instead of Git for Windows' (MINGW's) was on purpose. See actions/toolkit#165. Precisely, the action (MWE1 above) is expected to handle diferences between versions of tar. Moreover, if/when MSYS2 is installed (see #30 and #342) the environment might change, as it would be sensible to replace Git for Windows' tar with MSYS2's.

@miketimofeev
Copy link
Contributor

@eine yeah, we're still working on the best way to deliver MSYS2, so it's just a question of time. I've made this PR to fix that particular issue until MSYS2 isn't delivered.
#415

@miketimofeev
Copy link
Contributor

@eine PR has been merged. I will let you know when new image is available

@miketimofeev
Copy link
Contributor

@eine, unfortunately, this git tar breaks more than fixes. We have to roll back the changes. Please use 7z or consider adding C:\Program Files\Git\usr\bin to the path before your run.

@eine
Copy link
Author

eine commented Mar 1, 2020

@miketimofeev, as said, I'm ok with using 7z. However, if tc.extractTar is broken, it should be removed or a warning should be added.

@eine eine closed this as completed Mar 1, 2020
@miketimofeev
Copy link
Contributor

@ericsciple could you take care of tc.extractTar, please?

@ericsciple
Copy link

@eine

if tc.extractTar is broken

Can you clarify? The function finds tar in the PATH and calls it with the supplied flags (or default if not overridden).

For a .tar.xz file, it sounds like tar uses external tool xz to decompress (also must be in PATH?).

Adding git tar to the PATH for the hosted Windows runner won't fix for folks using self-hosted Windows runners.

If possible, may want to switch to a more common archive format on Windows (zip).

Other options might be:

  • If you need the version of tar bundled with git, then you could locate git using io.which, and then use relative path to effectively add C:\Program Files\Git\usr\bin to the PATH before calling extractTar.
  • Download or use a carry a different tool to expand the archive. It sounds like 7z will which. Could consider checking io.which to locate 7z, and downloading/caching if not found. Also could try 7zdec.exe which is very small. If it handles the file format then could carry that file with your action. It's what tool-cache uses for extract7z

@eine
Copy link
Author

eine commented Mar 3, 2020

@ericsciple, It seems to be fixed now. ´extractTar´ fails, as expected: https://github.com/eine/setup-msys2/runs/481303190?check_suite_focus=true

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
awaiting-deployment Code complete; awaiting deployment and/or deployment in progress bug Something isn't working
Projects
None yet
Development

No branches or pull requests

7 participants