-
-
Notifications
You must be signed in to change notification settings - Fork 8.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
Ensure ClassLoader
s have names for debugging
#9277
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
jtnord
commented
May 14, 2024
jtnord
commented
May 14, 2024
public PluginFirstClassLoader2(@NonNull URL[] urls, @NonNull ClassLoader parent) { | ||
super(Objects.requireNonNull(urls), Objects.requireNonNull(parent)); | ||
|
||
public PluginFirstClassLoader2(String name, @NonNull URL[] urls, @NonNull ClassLoader parent) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
class is annotated with @Restricted(NoExternalUse.class)
which is not visible in the collapsed diff.
olamy
approved these changes
May 15, 2024
jtnord
commented
May 15, 2024
jtnord
commented
May 15, 2024
jglick
changed the title
Ensure Classloaders have names for debugging
Ensure May 15, 2024
ClassLoader
s have names for debugging
jglick
approved these changes
May 15, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Co-authored-by: Jesse Glick <jglick@cloudbees.com>
jglick
approved these changes
May 15, 2024
jtnord
commented
May 15, 2024
jtnord
commented
May 15, 2024
jtnord
force-pushed
the
names-for-classloaders
branch
from
May 16, 2024 08:54
e796d10
to
e0c3211
Compare
jglick
approved these changes
May 16, 2024
jtnord
commented
May 16, 2024
/label ready-for-merge |
comment-ops-bot
bot
added
the
ready-for-merge
The PR is ready to go, and it will be merged soon if there is no negative feedback
label
May 16, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
developer
Changes which impact plugin developers
ready-for-merge
The PR is ready to go, and it will be merged soon if there is no negative feedback
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
giving a
ClassLoader
a name can make it easier to debug class loading issues that occur on agents.with jenkinsci/remoting#741 this gets propagated to the remote side so you can see what the
RemoteClassLoader
is actually loading from.tested a build of this to try and debug an issue with an
ssh-slaves
based agent and added a breakpoint on the classloading code with I was having issues with and connected to the agent process.Validated that the classloading issue I was attempting to diagnose has more diagnostics.
e.g.
Note: as the classloaders now have names, this will be shown in the default stack traces (similar to how we see
java.base/java.net.URLClassLoader
(due to this being present in theStackTraceElement
e.g.
Testing done
interactive debugging with an agent from
ssh-slaves
plugin and a breakpoint on some code that loads classes.inspected the classloader for several classes that are expected to come from different plugins.
Proposed changelog entries
Proposed upgrade guidelines
Agents that provide their own version of
agent.jar
will need to be updated to to use at least version3244.vf7f977e04755
of remoting.Generally this would impact inbound agents, ssh based agents should be updated automatically.
[tasklist]
Submitter checklist
@Restricted
or have@since TODO
Javadocs, as appropriate.@Deprecated(since = "TODO")
or@Deprecated(forRemoval = true, since = "TODO")
, if applicable.eval
to ease future introduction of Content Security Policy (CSP) directives (see documentation).Desired reviewers
@mention
Before the changes are marked as
ready-for-merge
:[tasklist]
Maintainer checklist
upgrade-guide-needed
label is set and there is a Proposed upgrade guidelines section in the pull request title (see example).lts-candidate
to be considered (see query).