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-30101] avoid temporarily offline cause is overwritten #6152
base: master
Are you sure you want to change the base?
Conversation
When taking an agent temporarily offline the reason why it was done was lost when the connection gets lost. Separate the temporarily offline cause from those and display both. Fixes: JENKINS-30101, JENKINS-30175 and JENKINS-50313
disconnect should not modify temporarily offline reason
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.
Overall looks good and reasonable. At the same time we need to discuss the desired behavior of getOfflineCauseReason()
just to be on the safe side
1fb5794
to
794cc7d
Compare
I don't think that the computer class should use the newly introduced method. It is not required. The existence of the temporarilyofflinecause in the Node class is so that after a restart Jenkins is able to restore the offline cause. But the actual handling of the causes is done in the Computer class and also the UI interacts with Computer and not Node. |
Please take a moment and address the merge conflicts of your pull request. Thanks! |
Please take a moment and address the merge conflicts of your pull request. Thanks! |
Please take a moment and address the merge conflicts of your pull request. Thanks! |
@jenkinsci/core friendly reminder |
Please take a moment and address the merge conflicts of your pull request. Thanks! |
@jenkinsci/core-pr-reviewers friendly reminder |
Please take a moment and address the merge conflicts of your pull request. Thanks! |
@basil @jenkinsci/core-pr-reviewers |
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 thanks, apologies for the delay
Please take a moment and address the merge conflicts of your pull request. Thanks! |
Please take a moment and address the merge conflicts of your pull request. Thanks! |
See JENKINS-30101.
See JENKINS-30175.
See JENKINS-50313.
When taking an agent temporarily offline the reason why it was done was
overwritten when the connection gets lost. Separate the temporarily offline
cause from those and display both in case they differ.
Testing
Besides the unit tests, tested manually that the offline causes are both shown.
Marking offline now shows the messaged
Marked temporarily offline by
while disconnecting stays withDIsconnected by
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
@mention
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
to be considered (see query).