-
-
Notifications
You must be signed in to change notification settings - Fork 9k
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
[JENKINS-46386] - Don't use unloadable things in remoting mkdirs calls. #3067
[JENKINS-46386] - Don't use unloadable things in remoting mkdirs calls. #3067
Conversation
mkdirs do remoting call by creating anonymous class. Remoting on remote side must load outer FilePath class with imports. FilePath had SystemProperties OnMaster.
Well FilePath to my understanding, must be loadable on the remote agent, so 👍 from me... but it does make the wider question, what to do about |
@stephenc @KostyaSha There are other calls, which may use I have created #3065, which should resolve the issue with class loading. |
Likely 👍 in this case anyway. I see no reason in specifying this setting in |
JENKINS-46386 as a reference is probably fine if we want to do backporting |
|
I not sure but probably we can make FilePath not loadable on remote, that would require using callable in separate classes. I tried, but as usual nested classes has unclear dependencies to outside variables. @stephenc @oleg-nenashev and second question is why ssh/jnlp doesn't fail? Should i force load this class somehow after channel building? |
Actually the classloading of this class should happen automatically if the class is not blacklisted by Remoting. That's why the method usually works fine on agents |
And why it wasn't covered with testcase already? |
@KostyaSha what exactly? FilePath or Remote servlet context usage? |
FreeStyle on remoting. AbstractBuild exists for a long time, i didn't expect to have such problems for such old/stable job type. |
Well, this issue happens only in a particular configuration. Otherwise we would have hundreds of issues in the bugtracker. From what I see none of existing JTH/ATH tests catches the issue, and there are lots of one using Remoting with classloading and FilePath. I was also unable to reproduce it locally. If you provide a step-by-step reproduction guide, I will write a test for it |
If #3065 does not land in time, I will merge this guy towards the weekly |
Would you revert this change when merging #3065? |
@daniel-beck No strong opinion. I do not see much sense to contribute |
PR for discussion.
mkdirs do remoting call by creating anonymous class.
Remoting on remote side must load outer FilePath class with imports.
FilePath had SystemProperties OnMaster.
@stephenc @oleg-nenashev i created and connected slave.jar via stdin/stdout and it fails with logically obvious error on FreeStyle job execution. Tested on 2.16, 2.60.
This change is