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

Calls to Bitbucket sometimes fail with com.atlassian.bitbucket.AuthorisationException error #183

Open
idemidenko opened this issue Dec 12, 2017 · 7 comments
Labels

Comments

@idemidenko
Copy link

idemidenko commented Dec 12, 2017

Plugin version - 1.11.6

Time to time notifications are failing with the next error, so Bitbucket doesn't receive such notifications:

Failed to notify Stash for commit 509950484482c15754de1cdb5aa5537d8bf318a2 ({"errors":[{"context":null,"message":"You are not permitted to access this resource","exceptionName":"com.atlassian.bitbucket.AuthorisationException"}]})

E.g. the next case is possible:
the issue is reproduced in a Jenkins job build, then other builds of the same job successfully send notifications without any configuration/credential changes, then the issue is reproduced again in subsequent builds, ...

@scaytrase
Copy link
Member

Do you use external authentication provider like AD or Crowd?

@idemidenko
Copy link
Author

No

@scaytrase
Copy link
Member

I think in any case you should refer bitbucket logs to see which account had denied access, the exception comes from bitbucket

@approximatenumber
Copy link

approximatenumber commented Jul 26, 2018

I get such errors when Bitbucket cannot connect to our Crowd server, which cannot connect to AD (that`s the lack of AD). It rarely happens but it`s nagging us because the opened PR freezes in building status and cannot be merged :(
It could be great if the plugin would try to connect to Bitbucket more than once time.

@darxriggs
Copy link
Collaborator

@scaytrase Do you think we could introduce an extra option like failBuildOnError to fail the build in case an error occurred in the plugin? Currently such HTTP errors are just logged but the build stays successful, making it quite hard to detect this issue from the outside.

@scaytrase
Copy link
Member

@darxriggs we can, but I hope such options should come from Jenkins side (in the inversed variant, like skipErrors as soon as in pipeline we can just try..catch it).

If every plugin introduce it's own option for the same mechanics it would be strange and inconsistent.

I really see no reason in failing entire build in case of failed notification, as soon it's only notification but it's only my opinion.

How do other notification plugin resolve this issue? At least we can adopt the same approach, I think

@darxriggs
Copy link
Collaborator

I had a look at some other plugins a while back regarding such error handling. There is no common approach visible.

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

No branches or pull requests

4 participants