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

Default CLASSPATH with Selenium breaks JRuby #242

Closed
headius opened this issue Jan 8, 2020 · 16 comments
Closed

Default CLASSPATH with Selenium breaks JRuby #242

headius opened this issue Jan 8, 2020 · 16 comments
Assignees
Labels

Comments

@headius
Copy link

headius commented Jan 8, 2020

It appears that the changes from #185 have caused Selenium's standalone server jar to be in the default system CLASSPATH environment variable. This needs to be removed.

jruby/jruby#6023 (comment)

That standalone jar contains a number of dependency libraries that have not been hidden or relocated ("shaded" in Maven parlance). As a result, any Java tools that have differing dependencies may pick up the wrong version of those libraries.

This is the cause of jruby/jruby#6023 because the older SnakeYAML included in Selenium conflicts with the expected version for JRuby's YAML library.

I would expect all environments are affect, assuming they all set this default CLASSPATH.

The fix is to not set (NEVER set) a global default CLASSPATH.

@eregon
Copy link

eregon commented Jan 8, 2020

https://github.com/actions/virtual-environments/blob/95954b3f022a1c4626d112bd4fe82d0812fa6f4b/images/linux/scripts/installers/google-chrome.sh#L74 seems the specific line setting CLASSPATH on Linux runners.

@headius
Copy link
Author

headius commented Jan 8, 2020

Ok so perhaps only Linux environments are affected.

@eregon
Copy link

eregon commented Jan 8, 2020

And https://github.com/actions/virtual-environments/pull/185/files#diff-5e79e2c7eccdc5e0edbd13c036ba94b6R32-R34 is probably what sets it on Windows.
macos-latest is not affected.

@headius
Copy link
Author

headius commented Jan 8, 2020

cc @pkuczynski

@pkuczynski
Copy link

Clearing CLASSPATH solved issues in my build, but it does not sound like a sensible requirement to make the build successful, don't you think?

https://github.com/rubyconfig/config/pull/228/files#diff-353995fb5bebaef307ec25fa5be39042R18

@headius
Copy link
Author

headius commented Jan 8, 2020

Another failing build: https://github.com/ruby/psych/pull/429/checks?check_run_id=380304944

This will affect all users running JRuby in Github Actions until it is resolved.

ghost pushed a commit to rubygems/rubygems that referenced this issue Jan 9, 2020
3074: Try workaround for JRuby build r=deivid-rodriguez a=deivid-rodriguez

# Description:

A change in the GA actions environment broke the JRuby build. Trying to apply the workaround mentioned in actions/runner-images#242 (comment).

# Tasks:

- [x] Describe the problem / feature
- [ ] Write tests
- [x] Write code to solve the problem
- [ ] Get code review from coworkers / friends

I will abide by the [code of conduct](https://github.com/rubygems/rubygems/blob/master/CODE_OF_CONDUCT.md).


Co-authored-by: David Rodríguez <deivid.rodriguez@riseup.net>
eregon added a commit to ruby/setup-ruby that referenced this issue Jan 9, 2020
@eregon
Copy link

eregon commented Jan 9, 2020

@bryanmacfarlane @alepauly Could you ping whoever at GitHub can fix this?
I think it breaks many GHA workflows and deserves a fairly urgent fix.

@alepauly
Copy link
Contributor

alepauly commented Jan 9, 2020

@bryanmacfarlane @alepauly Could you ping whoever at GitHub can fix this?
I think it breaks many GHA workflows and deserves a fairly urgent fix.

thanks for the ping @eregon, I'm looking into it since the changes from #185 have not been deployed to production so it's possible something else is the problem.

edit: ok, the changes from #184 are included into what's going out to production and that's what broke it. I'm coordinating a fix now.

@pkuczynski
Copy link

For me the issue was intermittent. So maybe #185 was deployed to some workers? Clearing CLASSPATH solved it for all builds...

@alepauly
Copy link
Contributor

alepauly commented Jan 9, 2020

For me the issue was intermittent. So maybe #185 was deployed to some workers? Clearing CLASSPATH solved it for all builds...

@pkuczynski the latest version which include #184 is not out in all machine pools so it is possible you've hit some of the older one versus the newer ones, correct. I stopped the roll out while we figure out what to do.

@alepauly
Copy link
Contributor

alepauly commented Jan 9, 2020

@eregon @pkuczynski @headius building new images and validating takes a while so tomorrow morning (EST) we'll deploy a quick fix that applies the workaround automatically to all builds while we continue to validate the changes to rebuild the image to deploy as a final solution early next week. From your POV there will be no difference between the intermediate solution and the final one but just wanted to give some details on what we're working on. Thanks again for reporting!

@headius
Copy link
Author

headius commented Jan 10, 2020

@alepauly Thank you for the quick turnaround!

@pkuczynski
Copy link

Thanks! I will wait for next week to test on my side.

@AndreyMaslennikov
Copy link
Contributor

@headius, @pkuczynski, @eregon, I've created PR #247. It's already merged and should fix this issue.

@alepauly
Copy link
Contributor

@headius, @pkuczynski, @eregon, I've created PR #247. It's already merged and should fix this issue.

Thanks @AndreyMaslennikov! One clarification though: the fix will deploy in the next build which should roll out next week. We are deploying the workaround today.

@headius
Copy link
Author

headius commented Jan 10, 2020

We are deploying the workaround today.

Good enough for me!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

6 participants