[JENKINS-57111] Do not put agent offline for exceptions in onOnline
Agent implementers use onOnline to perform actions after an agent put online. The API specifies that execeptions thrown by this method will not put an agent offline. However, the default implementation does exactly that. This change clarifies the API to say all exceptions will be logged and hardens setChannel against exceptions during onOnline. NOTE: Errors will still cause an agent to go offline as they are generally fatal conditions. Also added tests to verify the behavior.
Please register or sign in to comment