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

ENOENT: no such file or directory while attempting to upload #240

Open
2 of 6 tasks
iamrecursion opened this issue Aug 3, 2021 · 12 comments
Open
2 of 6 tasks

ENOENT: no such file or directory while attempting to upload #240

iamrecursion opened this issue Aug 3, 2021 · 12 comments
Labels
bug Something isn't working

Comments

@iamrecursion
Copy link

Describe the bug
We're using upload-artifact to upload our packages as part of our workflow. This has, historically, worked absolutely fine on Windows, Linux, and macOS, but recently has started failing on Windows only with the following:

ENOENT: no such file or directory, realpath 'D:\a\enso-staging\enso-staging\repo\built-distribution\enso-engine-0.2.19-SNAPSHOT.2021-08-03-windows-amd64\enso-0.2.19-SNAPSHOT.2021-08-03\lib\Standard\Table\0.1.0\polyglot\java\xmlbeans-5.0.1\org\apache\xmlbeans\metadata\attribute\http_3A_2F_2Fwww_2Ew3_2Eorg_2FXML_2F1998_2Fnamespace'

Curiously enough, it works during our release workflow, but not our nighttly workflow, and we can't find any material difference between the two that would contribute to this.

Version

  • V1
  • V2

Environment

  • self-hosted
  • Linux
  • Windows
  • Mac

Run/Repo Url
You can find a failing run here.

How to reproduce
It fails consistently when running that workflow.

@iamrecursion iamrecursion added the bug Something isn't working label Aug 3, 2021
@radeusgd
Copy link

radeusgd commented Aug 9, 2021

A difference between the release workflow and the nightly workflow is that the version string (which is included twice in the mentioned path) is longer - release is something like 0.2.22 and nightly is 0.2.22-SNAPSHOT.2021-08-07. Since this only happens on Windows, it may be related to some issues with handling very long paths on Windows.

@radeusgd
Copy link

radeusgd commented Aug 9, 2021

I have confirmed that the file for which ENOENT is raised does in fact exist, so it seems that somehow the error is caused by the long path.

After some digging I have found that the offending call seems to be the promise returning fs.promises.realpath(...) called from globber.glob.

I was able to replicate this in Node REPL too, calling fs.promises.realpath(longpath) yielded the same error. Interestingly, calling the 'classic' callback-based variant fs.realpath on the same path was returning the correct result, so this looks like it may be a bug in Node's filesystem library.

To try to reproduce this you may create a directory hierarchy D:\a\enso-staging\enso-staging\repo\built-distribution\enso-engine-0.2.19-SNAPSHOT.2021-08-03-windows-amd64\enso-0.2.19-SNAPSHOT.2021-08-03\lib\Standard\Table\0.1.0\polyglot\java\xmlbeans-5.0.1\org\apache\xmlbeans\metadata\attribute\http_3A_2F_2Fwww_2Ew3_2Eorg_2FXML_2F1998_2Fnamespace and try running fs.promises.realpath on this path.

@radeusgd
Copy link

radeusgd commented Aug 9, 2021

Reported this in the Node repo: nodejs/node#39721

HoloRin added a commit to rabbitmq/rules_erlang that referenced this issue Jan 7, 2022
HoloRin added a commit to rabbitmq/rules_erlang that referenced this issue Jan 18, 2022
Primary changes:
- Add Windows support (when using symlinks
https://docs.bazel.build/versions/main/windows.html#enable-symlink-support)
- Rework a lot of names based on a year of bazel knowledge

Note that the github actions workflow does not upload logs artifact in
windows due to a bug:
actions/upload-artifact#240
HoloRin added a commit to rabbitmq/rules_erlang that referenced this issue Jan 18, 2022
Primary changes:
- Add Windows support (when using symlinks
https://docs.bazel.build/versions/main/windows.html#enable-symlink-support)
- Rework a lot of names based on a year of bazel knowledge

Note that the github actions workflow does not upload logs artifact in
windows due to a bug:
actions/upload-artifact#240
@laeubi
Copy link

laeubi commented Aug 3, 2022

We have a similar problem in the PDE project, is there any ETA for a fix, any information to provide or anything else to push this forward?

@laeubi
Copy link

laeubi commented Aug 13, 2022

Is there any ETA when this get fixed? This currently makes the Windows artifacts upload unusable for us.

@laeubi
Copy link

laeubi commented Nov 21, 2022

Still an issue :-(

@HannesWell
Copy link

Is there any plan when this will be fixed?

@kwin
Copy link

kwin commented Dec 12, 2022

@kwin
Copy link

kwin commented Dec 30, 2022

Although the upstream Node JS issue (nodejs/node#39721) is fixed with 16.8.0 we are still running into this issue (with a GH runner on Windows version: '2.299.1', using Node JS 16.8.1). Seems that there is some other issue with this action not related to the Node JS issue.

The failed run is at https://github.com/eclipse-m2e/m2e-core/actions/runs/3803309550/jobs/6469609937

@CrazyHZM
Copy link

Is there any progress?

@Piedone
Copy link

Piedone commented Feb 8, 2024

actions/checkout#955 would help here.

@scrnjakovic
Copy link

Any progress with this?

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

8 participants