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

Options to handle exception when notifying bitbucket #274

Open
muchnik opened this issue Nov 24, 2021 · 4 comments
Open

Options to handle exception when notifying bitbucket #274

muchnik opened this issue Nov 24, 2021 · 4 comments

Comments

@muchnik
Copy link

muchnik commented Nov 24, 2021

So we are heading with some network problems, that results in SocketException on notifying bitbucket and we can't really do anything about it, because notifyBitbucket() method always returns true and catches exception by itself.

What i suggest is to:

  1. Implement retries on notify for retryable errors
  2. Propagate actual job status (true or false) from method call, so clients can make retries themselves.
  3. Add option that enables exception propagation to client side
14:35:47 Notifying Stash at "<...>"
14:35:51 Caught exception while notifying Stash with id <...>
14:35:51 java.net.SocketException: Connection reset
@muchnik
Copy link
Author

muchnik commented Dec 6, 2021

@scaytrase @gruetter Friedly reminder

@scaytrase
Copy link
Member

hello @muchnik, sorry for no response. currently this plugin is not actively developed, but contributions are always welcome. Most of latest releases are pure community contributed.

Can you explain what you expect in (2) ? try..catch clause for Jenkins file pipeline?

@muchnik
Copy link
Author

muchnik commented Dec 6, 2021

@scaytrase
I have 3 suggestions to fix this problem: first is to make retries on plugin side for retriable exceptions, second is to return actual job status from notifyBitbucket() which is now always returns true -- this can break back compatibility, third is to add flag to configuration that allows exception propagation onto client side, so we can use try...catch in Jenkinsfile.

We can choose any -- and i`ll try to make a PR.

@paul-alekseev
Copy link

Hello @muchnik and @scaytrase. Is there any progress with that?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants