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

Pass through the remote ClassLoader’s name #741

Merged
merged 2 commits into from
May 15, 2024
Merged

Conversation

jtnord
Copy link
Member

@jtnord jtnord commented May 14, 2024

Testing done

Created a version of Jenkins with a local build of this, attached a debugger to an ssh-slaves agent and put a breakpoint on some code that runs in the agent (from the git-client plugin) to observe classloading.

See jenkinsci/jenkins#9277

Submitter checklist

Preview Give feedback

@jtnord jtnord force-pushed the debug branch 2 times, most recently from dcb8d41 to e55daa8 Compare May 14, 2024 15:40
@jtnord jtnord changed the title Debug Pass through the remote classloaders name May 14, 2024
@jtnord jtnord force-pushed the debug branch 3 times, most recently from d8ef923 to 96d6148 Compare May 14, 2024 15:47
@jtnord jtnord added the enhancement For changelog: An enhancement providing new capability. label May 15, 2024
@jtnord jtnord marked this pull request as ready for review May 15, 2024 09:51
add getName to the IClassloader and set a name in the RemoteClassLoader

This improves the debugability from RemoteClassloaders to understand any
classloading related issues.

/**
* Name of the classLoader
* @since 3242
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

assumes this will be the next thing released

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I do not think we bother with @since in CD-versioned components, though it is possible.

@jtnord jtnord requested review from jglick and a team May 15, 2024 09:54
@jglick jglick changed the title Pass through the remote classloaders name Pass through the remote ClassLoader’s name May 15, 2024
src/main/java/hudson/remoting/RemoteClassLoader.java Outdated Show resolved Hide resolved

/**
* Name of the classLoader
* @since 3242
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I do not think we bother with @since in CD-versioned components, though it is possible.

If we can not obtain the name of the classloader then add the proxies
identityHashCode so they will be unique amongst all others.
@jtnord jtnord merged commit f7f977e into jenkinsci:master May 15, 2024
13 checks passed
@jtnord jtnord deleted the debug branch May 15, 2024 17:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement For changelog: An enhancement providing new capability.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants