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
Issue with unprotect_branch_new_api #219
Comments
Hi @bethmal ! Thanks for reporting the issues. It would help if you could provide some more context though. Preferably configuration snippets that have caused those errors. Ad 3: can you take a look a this please, @YuraBeznos ? Maybe it will be obvious to you what is the cause. |
@gdubicki If unprotect_access_level is not provided in configuration yml file, and meanwhile master branch is not protected (the reason could be either it was not protected on purpose or is was unprotected by gitlabform ), then procedure protect_branch does nothing. In this scenario, if a file need to be updated as well, the re-protect operation fails after the file is pushed. If master branch is not protected (the reason could be either it was not protected on purpose or is was unprotected by gitlabform ), and then unprotect_branch_new_api is invoked somehow, exceptions mentioned above would be raised. The response code 404 is not json dump-able or loadable. The response of get_branch_access_levels contains no unprotect_access_levels in our case.
|
and a test that shows that it works. Fixes #219.
using the new API. Partially fixes #219.
Hi @gdubicki , |
Sorry @bethmal, but we need more contributors to get issues fixed faster. I am already doing the best I can. Please check out v2.0.2 - it should have this issue completely fixed. |
@gdubicki new: Please review if this fix works for all. Thanks. |
to fix #219 and possibly other flows where we expected 404 response.
to fix #219 and possibly other flows where we expected 404 response.
Please check out |
@gdubicki Thanks for the update. v2.0.5rc2 works perfect for this scenario. |
Great! We just released v2.0.5 final with this fix so we can close this issue. Of course please reopen if you see any issues with this again. |
Hi,
In version 2.0.0post1,
Procedure _make_requests_to_api, core.py line 113: exception when response.status_code is 404, exception message "json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)".
Procedure _make_request_to_api, core.py line 208,: exception when response.status_code is 404, exception message "json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)".
Seems expected_codes contains code 404, not quite understand why the judgement in line 192 of core.py is presented.
Thanks.
The text was updated successfully, but these errors were encountered: