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-22853] - Be robust against delayed EOF command when unexporting streams #97

Merged

Conversation

oleg-nenashev
Copy link
Member

@oleg-nenashev oleg-nenashev commented Aug 4, 2016

In particular cases the objects can be unexported before the EOF command arrives from another channel side. In my case it happens, because UserRequest#releaseExports already does it. In such case remoting prints horrible exceptions to the log. So we actually want not to unexport items in EOF Command if we're late.

Changes:

  • Improve error propagation in the code (no IllegalStateExceptions anymore)
  • All 3 EOF commands do not fail if there is no stream object. Unexport commands work as before
  • TBD - Close closeable items when we release them in ExportTable

https://issues.jenkins-ci.org/browse/JENKINS-22853

@reviewbybees (esp. @stephenc)

@oleg-nenashev oleg-nenashev changed the title [JENKINS-22853] - Be robust against delayed EOF command during unexporting the stuff [JENKINS-22853] - Be robust against delayed EOF command when unexporting streams Aug 4, 2016
@ghost
Copy link

ghost commented Aug 4, 2016

This pull request originates from a CloudBees employee. At CloudBees, we require that all pull requests be reviewed by other CloudBees employees before we seek to have the change accepted. If you want to learn more about our process please see this explanation.

@oleg-nenashev
Copy link
Member Author

PR Builder fails with "[WARNING] Failed to notify spy hudson.maven.Maven3Builder$JenkinsEventSpy: Invalid object ID 7 iota=14", lol . Just another issue to tackle

* Exception for Invalid object processing in {@link ExportTable}
* @author Oleg Nenashev
*/
public class InvalidObjectIdException extends ExecutionException {
Copy link
Member Author

Choose a reason for hiding this comment

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

I would use RemotingSystemException, but it's Runtime one

@stephenc
Copy link
Member

stephenc commented Aug 6, 2016

🐝

@oleg-nenashev
Copy link
Member Author

I'll likely have to replace InvalidObjectIdException by just ExecutionException. I nest the exception in particular cases, and it gets serialized over the channel from agent to master. Classloading in this direction does not work, hence we get a ClassNotFound exception if agent remoting version is greater than the core's one

Self-:bug:

@oleg-nenashev
Copy link
Member Author

@stephenc need re-bee

@stephenc
Copy link
Member

🐝

@oleg-nenashev
Copy link
Member Author

@reviewbybees done

@oleg-nenashev oleg-nenashev merged commit c072637 into jenkinsci:master Aug 10, 2016
oleg-nenashev added a commit to oleg-nenashev/jenkins that referenced this pull request Aug 14, 2016
Changes are listed below:

Fixed issues:
* [JENKINS-22853](https://issues.jenkins-ci.org/browse/JENKINS-22853) -
Be robust against the delayed EOF command when unexporting input and output streams.
(jenkinsci/remoting#97)
* Fixed ~20 minor issues reported by FindBugs.
More fixes to be delivered in future versions.
(jenkinsci/remoting#96)

Enhancements:
* [JENKINS-37218](https://issues.jenkins-ci.org/browse/JENKINS-37218) -
Performance: <code>ClassFilter</code> does not use Regular Expressions anymore to match <code>String.startsWith</code> patterns.
(jenkinsci/remoting#92)
* [JENKINS-37031](https://issues.jenkins-ci.org/browse/JENKINS-37031)
<code>TcpSlaveAgentListener</code> now publishes a list of supported agent protocols to speed up connection setup.
(jenkinsci/remoting#93)
DanielWeber added a commit to DanielWeber/jenkins that referenced this pull request Aug 26, 2016
(Cherry Pick of 06be933)

Changes are listed below:

Fixed issues:
* [JENKINS-22853](https://issues.jenkins-ci.org/browse/JENKINS-22853) -
Be robust against the delayed EOF command when unexporting input and output streams.
(jenkinsci/remoting#97)
* Fixed ~20 minor issues reported by FindBugs.
More fixes to be delivered in future versions.
(jenkinsci/remoting#96)

Enhancements:
* [JENKINS-37218](https://issues.jenkins-ci.org/browse/JENKINS-37218) -
Performance: <code>ClassFilter</code> does not use Regular Expressions anymore to match <code>String.startsWith</code> patterns.
(jenkinsci/remoting#92)
* [JENKINS-37031](https://issues.jenkins-ci.org/browse/JENKINS-37031)
<code>TcpSlaveAgentListener</code> now publishes a list of supported agent protocols to speed up connection setup.
(jenkinsci/remoting#93)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants