-
-
Notifications
You must be signed in to change notification settings - Fork 93
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
fix: report SAML issue as fatal #1148
Conversation
Currently this is catched as AuthentificationFailure making Mergify retrying for ever. This change mark the SAML message as fatal. So the error message coming from Github is reported on the PullRequest. Related #1145 Fixes MERGIFY-ENGINE-1MG
b"Protected branch update failed": BranchUpdateFailure, | ||
b"Couldn't find remote ref": BranchUpdateFailure, | ||
} | ||
GIT_MESSAGE_TO_EXCEPTION = collections.OrderedDict( |
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.
Why does this need to be ordered?
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.
SAML error also match 'The requested URL returned error, 403'. So first match first raise.
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.
Ok, that could have been great to have a bunch of unit test around these actually, so we're sure we don't break those.
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.
I'm approving nevertheless, but if you have the error message around, we might want to add some tests.
b"Protected branch update failed": BranchUpdateFailure, | ||
b"Couldn't find remote ref": BranchUpdateFailure, | ||
} | ||
GIT_MESSAGE_TO_EXCEPTION = collections.OrderedDict( |
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.
Ok, that could have been great to have a bunch of unit test around these actually, so we're sure we don't break those.
Currently this is catched as AuthentificationFailure making Mergify
retrying for ever. This change mark the SAML message as fatal. So
the error message coming from Github is reported on the PullRequest.
Related #1145
Fixes MERGIFY-ENGINE-1MG