-
Notifications
You must be signed in to change notification settings - Fork 4
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
Warn on & skip workflow runs for certain "broken" GitHub workflows #151
Conversation
looks good. updated in tinuous-dev conda env of datalad@smaug which is used by cron jobs and testing on datalad-extensions. Since needs to wait for all those retries -- I will just check it later. |
ha -- it crashed with 502 not 500
I have checked prior emails -- they were about 500s. I guess we should adjust condition so it could be 500 or 502. I will try with that. |
src/tinuous/github.py
Outdated
and reason.args[0] | ||
== ResponseError.SPECIFIC_ERROR.format(status_code=500) |
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 will try now
and reason.args[0] | |
== ResponseError.SPECIFIC_ERROR.format(status_code=500) | |
and (reason.args[0] in | |
[ResponseError.SPECIFIC_ERROR.format(status_code=500), | |
ResponseError.SPECIFIC_ERROR.format(status_code=502)]) |
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.
confirming that smth like that (I reentered manually) worked but needs adjustment of the log message below to log actual status_code - not hard-coded 500
-- please adjust accordingly and let's get it merged/released (adding a label).
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.
@yarikoptic Should the code just catch 500 and 502 here, or also 503 and 504 (the same as the status codes that are already retried)?
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.
Totally up to you - feel free to add those 5xx into the mix here as well .
- Originally I thought about it and because we are dealing with specific workaround, thought we better keep to 500 and 502 until we run into the case where any other 5xx shows up for this particular scenario since we do not want to skip any other similar case I guess.
- Since we do test for the
since
and presence of workflow file I think it would be ok if we skip on any 5xx.
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.
Updated: 74066c7
Codecov Report
@@ Coverage Diff @@
## master #151 +/- ##
==========================================
+ Coverage 69.15% 69.88% +0.72%
==========================================
Files 10 10
Lines 976 993 +17
Branches 183 152 -31
==========================================
+ Hits 675 694 +19
+ Misses 244 242 -2
Partials 57 57
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
@@ -34,6 +35,12 @@ | |||
sanitize_pathname, | |||
) | |||
|
|||
RETRY_STATUSES = [500, 502, 503, 504] |
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.
eh, I was trying to avoid "equating" the RETRY_STATUSES
to all the statues we might want to skip on (only 5xxs). ATM they are indeed identically but in general not necessarily the same, so IMHO it mixes the semantics abit ... but since functionally is ok ATM, let's proceed. Thank you @jwodder ! Merging
Closes #150.