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

[Bug Report] bundler: failed to load command: packwerk #360

Open
mrcasals opened this issue Jun 27, 2023 · 1 comment
Open

[Bug Report] bundler: failed to load command: packwerk #360

mrcasals opened this issue Jun 27, 2023 · 1 comment
Labels
bug Something isn't working

Comments

@mrcasals
Copy link

mrcasals commented Jun 27, 2023

Description
After upgrading to Ruby 3.0, we started getting this kind of errors:

......................bundler: failed to load command: packwerk (/runner/_work/app/app/backend/vendor/bundle/ruby/3.0.0/bin/packwerk)
/runner/_work/app/app/backend/vendor/bundle/ruby/3.0.0/gems/parallel-1.22.1/lib/parallel.rb:86:in `rescue in work': Parallel::DeadWorker (Parallel::DeadWorker)
	from /runner/_work/app/app/backend/vendor/bundle/ruby/3.0.0/gems/parallel-1.22.1/lib/parallel.rb:83:in `work'
	from /runner/_work/app/app/backend/vendor/bundle/ruby/3.0.0/gems/parallel-1.22.1/lib/parallel.rb:482:in `block (4 levels) in work_in_processes'
	from /runner/_work/app/app/backend/vendor/bundle/ruby/3.0.0/gems/parallel-1.22.1/lib/parallel.rb:597:in `with_instrumentation'
	from /runner/_work/app/app/backend/vendor/bundle/ruby/3.0.0/gems/parallel-1.22.1/lib/parallel.rb:481:in `block (3 levels) in work_in_processes'
	from /runner/_work/app/app/backend/vendor/bundle/ruby/3.0.0/gems/parallel-1.22.1/lib/parallel.rb:469:in `loop'
	from /runner/_work/app/app/backend/vendor/bundle/ruby/3.0.0/gems/parallel-1.22.1/lib/parallel.rb:469:in `block (2 levels) in work_in_processes'
	from /runner/_work/app/app/backend/vendor/bundle/ruby/3.0.0/gems/parallel-1.22.1/lib/parallel.rb:222:in `block (4 levels) in in_threads'
/runner/_work/app/app/backend/vendor/bundle/ruby/3.0.0/gems/activesupport-6.1.7.3/lib/active_support/core_ext/marshal.rb:8:in `load': end of file reached (EOFError)
	from /runner/_work/app/app/backend/vendor/bundle/ruby/3.0.0/gems/activesupport-6.1.7.3/lib/active_support/core_ext/marshal.rb:8:in `load'
	from /runner/_work/app/app/backend/vendor/bundle/ruby/3.0.0/gems/parallel-1.22.1/lib/parallel.rb:84:in `work'
	from /runner/_work/app/app/backend/vendor/bundle/ruby/3.0.0/gems/parallel-1.22.1/lib/parallel.rb:482:in `block (4 levels) in work_in_processes'
	from /runner/_work/app/app/backend/vendor/bundle/ruby/3.0.0/gems/parallel-1.22.1/lib/parallel.rb:597:in `with_instrumentation'
	from /runner/_work/app/app/backend/vendor/bundle/ruby/3.0.0/gems/parallel-1.22.1/lib/parallel.rb:481:in `block (3 levels) in work_in_processes'
	from /runner/_work/app/app/backend/vendor/bundle/ruby/3.0.0/gems/parallel-1.22.1/lib/parallel.rb:469:in `loop'
	from /runner/_work/app/app/backend/vendor/bundle/ruby/3.0.0/gems/parallel-1.22.1/lib/parallel.rb:469:in `block (2 levels) in work_in_processes'
	from /runner/_work/app/app/backend/vendor/bundle/ruby/3.0.0/gems/parallel-1.22.1/lib/parallel.rb:222:in `block (4 levels) in in_threads'

It happens a bit randomly and we cannot debug it, but maybe you have some clues with the stacktrace. Packwerk runs for most of the app, but suddenly bundler says it cannot find the command and halts.

To me, Parallel::DeadWorker and the end of file reached (EOFError) lines seem to most relevant, but I don't have enough knowledge about packwerk internals to understand what might be the issue.

To Reproduce
None, sadly :(

Expected Behaviour
bundler should be able to find the command.

Screenshots
If applicable, add screenshots to help explain your problem.

Version Information

  • Packwerk: v3.0.1
  • Ruby 3.0.2

Additional Context
None

@mrcasals mrcasals added the bug Something isn't working label Jun 27, 2023
@yesthesoup
Copy link

yesthesoup commented Dec 7, 2023

This was happening in my project in the past as well, with bin/packwerk check and bin/packwerk validate crashing intermittently.

I worked around it by setting:

# packwerk.yml
parallel: false

in case anyone else is running into this, although I can't reproduce it now.

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

2 participants