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-60867] Prevent creation of duplicated SetupWizard singleton instances on Jenkins startup #4456
[JENKINS-60867] Prevent creation of duplicated SetupWizard singleton instances on Jenkins startup #4456
Conversation
Hi @Wadeck ! Thank you for including me in a reviewers! Your solution is so elegant! I just want to be sure that it works fine. You didn't specify in PR description that you actually tested Jenkins with this changes. Is setup wizard still works? |
I tested manually the two scenarios explained in the Jira ticket. One with a SetupWizard being processed to the end and one with a SetupWizard being interrupted and restarting to finish it. In both situation the wizard was fine (as before). :) |
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.
LGTM
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.
LGTM
Great! I approved this PR, thanks! I was wondering how else could we break Setup Wizard. And it appears that it is possible. Try to add this test to SetupWizardRestartTest https://gist.github.com/BogdanSukonnov/f526d9bf3db5fa25fbb57928e1e3728b |
What do you think about other approach? We can add hashCode() and equals() implementation to the anonimous class |
@BogdanSukonnov Thanks for your feedbacks!
What you did initially with the additional condition inside the filter was a good solution to remove the symptom of the bug, in this approach I am trying to ensure the root cause is cured. All the proposals should work as well, I just "feel" that this way is the "cleanest". |
@Wadeck thanks for clarifying. |
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.
IIUC this corrects an older fix(the issue is still fixed and behaviour is identical to the user)
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.
Do we really want to skip the changelog here?
I don’t think so |
Maybe not my initial thought was around behaviour being identical so users do not need a notification via changelog. Although an internal changelog would be fine as well. |
I plan to merge it tomorrow if no negative feedback |
I reclassified it as a bug, because singleton duplication might be a root cause of other Setup Wizard issues (reported or future ones). Thanks to @Wadeck for catching it! |
…instances on Jenkins startup (jenkinsci#4456) * [JENKINS-60867] Blank page after SetupWizard: root cause * Correct a test that was a bit too greedy
Follow-up of https://issues.jenkins-ci.org/browse/JENKINS-59017.
More details in the ticket: JENKINS-60867.
Proposed changelog entries
Proposed upgrade guidelines
N/A
Submitter checklist
Proposed changelog entries
section only if there are breaking changes or other changes which may require extra steps from users during the upgradeDesired reviewers
@BogdanSukonnov as he proposed the symptom correction
@Vlatombe as one of our SetupWizard / init reactor
Maintainer checklist
Before the changes are marked as
ready-for-merge
:Proposed changelog entries
are correctupgrade-guide-needed
label is set and there is aProposed upgrade guidelines
section in the PR title. (example)lts-candidate