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

KubernetesSlave#readResolve should call super implementation #1420

Merged
merged 1 commit into from
Aug 23, 2023

Conversation

Vlatombe
Copy link
Member

As I understand it, this caused KubernetesSlave#nodeProperties to be null after a restart instead of returning an empty list.

Could not reproduce it via RestartPipelineTest maybe because RestartableJenkinsRule is not realistic.

Testing done

Submitter checklist

Preview Give feedback

@Vlatombe Vlatombe requested a review from a team as a code owner August 23, 2023 08:53
@Vlatombe Vlatombe added the bug Bug Fixes label Aug 23, 2023
@Vlatombe Vlatombe changed the title readResolve should call super implementation KubernetesSlave#readResolve should call super implementation Aug 23, 2023
Copy link
Member

@jglick jglick left a comment

Choose a reason for hiding this comment

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

https://github.com/jenkinsci/jenkins/blob/ae74db6cf1945c57a4ecc4ae4273a9c924f19429/core/src/main/java/hudson/model/Slave.java#L587-L592 OK. Did you try JenkinsSessionRule? But either that or RestartableJenkinsRule should work to reproduce this sort of issue, provided of course that you can arrange for an agent to stick around across a restart.

@Vlatombe
Copy link
Member Author

I've tried tweaking org.csanchez.jenkins.plugins.kubernetes.pipeline.RestartPipelineTest#taskListenerAfterRestart which uses RestartableJenkinsRule, checking nodeProperties after restart, but somehow the assertion already worked, which si weird, unless I'm missing something else in the workflow (outside of test setup) that would make this behave differently?

@Vlatombe Vlatombe merged commit 9ddbd5a into jenkinsci:master Aug 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Bug Fixes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants