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

balena push fails when invalid symlink is present even if ignored #2593

Open
majorz opened this issue Feb 21, 2023 · 2 comments
Open

balena push fails when invalid symlink is present even if ignored #2593

majorz opened this issue Feb 21, 2023 · 2 comments

Comments

@majorz
Copy link

majorz commented Feb 21, 2023

Existing invalid symlink inside the project is breaking balena push even if it has been ignored inside .dockerignore file. Affects all balena CLI versions and OS versions this is run on.

Steps to reproduce:

  1. Create a minimal application
  2. Create an invalid symlink ln -sf non_existing_file invalid_symlink
  3. Add invalid_symlink to .dockeignore file
  4. balena push the project

The command exits early with:

Packaging the project source...
[Debug]   Tarring all non-ignored files...
No such file or directory: (..)/invalid_symlink
Error: ENOENT: no such file or directory, stat '(..)/invalid_symlink'

It looks like the error originates early in listFiles of lib/utils/ignore.ts and at that point .dockerignore is still not being processed. An easier fix could be to ignore all broken symlinks at that stage by default.

@jellyfish-bot
Copy link

[majorz] This has attached https://jel.ly.fish/5c0038d6-997e-42b0-bd52-4115e64dfcd8

@majorz
Copy link
Author

majorz commented Feb 21, 2023

Related to #2383, but not exactly the same bug.

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

No branches or pull requests

2 participants