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

[JENKINS-74992] Avoid NPE on informers #1630

Merged
merged 1 commit into from
Dec 19, 2024

Conversation

amuniz
Copy link
Member

@amuniz amuniz commented Dec 19, 2024

I found out when working on a CloudBees proprietary feature that KubernetesCloud#readResolve is not always called on deserialization. I think this will not happen in OSS, but let's stay on the safe side and initialize the field before using it.

Following up #1627

Testing done

Submitter checklist

  • Make sure you are opening from a topic/feature/bugfix branch (right side) and not your main branch!
  • Ensure that the pull request title represents the desired changelog entry
  • Please describe what you did
  • Link to relevant issues in GitHub or Jira
  • Link to relevant pull requests, esp. upstream and downstream changes
  • Ensure you have provided tests - that demonstrates feature works or fixes the issue

I found out when working on a CloudBees proprietary feature that
`KubernetesCloud#readResolve` is not always called on deserialization.
I think this will not happen in OSS, but let's stay on the safe side and
initialize the field before using it.
@amuniz amuniz requested a review from a team as a code owner December 19, 2024 16:10
Comment on lines +53 to +55
String message = c.getMessage();
String formatted =
String.format("%n\tPod [%s][%s] %s", phase, c.getReason(), message != null ? message : "No message");
Copy link
Member Author

Choose a reason for hiding this comment

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

Unrelated, but I just saw it during testing and thought it would be ok to slip it here :)

@Vlatombe Vlatombe added the bug Bug Fixes label Dec 19, 2024
@Vlatombe Vlatombe enabled auto-merge (squash) December 19, 2024 16:14
@Vlatombe Vlatombe merged commit c91e951 into jenkinsci:master Dec 19, 2024
9 checks passed
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.

2 participants