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

Usage of $0 when using TeamCity Rake Runner #888

Open
nbrien opened this issue Dec 15, 2022 · 4 comments
Open

Usage of $0 when using TeamCity Rake Runner #888

nbrien opened this issue Dec 15, 2022 · 4 comments

Comments

@nbrien
Copy link

nbrien commented Dec 15, 2022

When using the rake runner build step in TeamCity we get an issue when parallel_drop[XXX] it calls the executing command via $0. which is the rakerunner. (this only broke after upgrading to Ruby 3.1)

 /home/ubuntu/.rvm/gems/ruby-3.1.3@rails-6.0.6/gems/parallel_tests-3.13.0/lib/parallel_tests/test/runner.rb:111:in `popen': Permission denied - /opt/JetBrains/TeamCity/buildAgent/plugins/rake-runner/rb/runner/rakerunner.rb (Errno::EACCES)

The fix is to not use the rake runner and use a custom script in the build step, however I was curious if $0 should be used at all.

@grosser
Copy link
Owner

grosser commented Dec 15, 2022

$0 seems to have worked for everyone so far, so I'm hesitant to change it.
Afaik simplest solution would be to add some kind of PARALLEL_RAKE_RUNNER= env var.
Alternative could be to find something similar to $0 but idk if that exists.

@nbrien
Copy link
Author

nbrien commented Dec 15, 2022

Yes I was also thinking of an ENV switch. I can try prototype something over the holidays and open a pull. I understand the reluctance to change from the $0. I was however curious if parallel would work with anything else than rake?

Thanks for getting back to me and thanks for all the hard work over the years on your repos.

@grosser
Copy link
Owner

grosser commented Dec 16, 2022

not sure if that's what you meant, but parallel ships with an executable, the rake task is just a wrapper around that

@iovis
Copy link

iovis commented Feb 27, 2023

It breaks for us too, we just updated and we’re using an internal script to set up the context of projects and to reset state

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

3 participants