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

bug(pipelines schedule): take_ownership method not accepted return code #147

Closed
grzesuav opened this issue Dec 7, 2020 · 12 comments
Closed
Labels

Comments

@grzesuav
Copy link
Contributor

grzesuav commented Dec 7, 2020

Traceback (most recent call last):
  File "/gitlabform/gitlabform/gitlabform/core.py", line 302, in process_all
    self.project_processors.process_project(
  File "/gitlabform/gitlabform/gitlabform/processors/project/__init__.py", line 57, in process_project
    processor.process(project_and_group, configuration, dry_run)
  File "/gitlabform/gitlabform/gitlabform/processors/util/decorators.py", line 42, in method_wrapper
    return method(self, project_and_group, SafeDict(configuration), dry_run)
  File "/gitlabform/gitlabform/gitlabform/processors/abstract_processor.py", line 34, in process
    self._process_configuration(project_or_project_and_group, configuration)
  File "/gitlabform/gitlabform/gitlabform/processors/project/schedules_processor.py", line 46, in _process_configuration
    self.gitlab.take_ownership(
  File "/gitlabform/gitlabform/gitlab/schedules.py", line 48, in take_ownership
    self._make_requests_to_api(
  File "/gitlabform/gitlabform/gitlab/core.py", line 132, in _make_requests_to_api
    response = self._make_request_to_api(
  File "/gitlabform/gitlabform/gitlab/core.py", line 217, in _make_request_to_api
    raise UnexpectedResponseException(
gitlabform.gitlab.core.UnexpectedResponseException: Request url='https://repo/pipeline_schedules/xxxx/take_ownership', method=POST, data='None' failed - expected code(s) [200], got code 201 & body:

key message : expected code(s) [200], got code 201 - when I did the same with curl I see < HTTP/1.1 201 Created

@grzesuav
Copy link
Contributor Author

grzesuav commented Dec 7, 2020

reported on 13.5.4-ee

@gdubicki
Copy link
Member

gdubicki commented Dec 8, 2020

Thanks for reporting! Will be fixed in v.1.18.3 which should be built any minute. :)

@gdubicki
Copy link
Member

gdubicki commented Dec 8, 2020

Please let me know if it is correctly fixed, @grzesuav . I did the fix in a hurry and didn't add a test to verify it. 😓

@grzesuav
Copy link
Contributor Author

grzesuav commented Dec 9, 2020

Have exactly the same on 1.18.3.2-alpine

@grzesuav
Copy link
Contributor Author

grzesuav commented Dec 9, 2020

@gdubicki does not seems to be fixed

@gdubicki gdubicki reopened this Dec 9, 2020
@grzesuav
Copy link
Contributor Author

grzesuav commented Dec 9, 2020

I will try to add more info tommorow

@grzesuav
Copy link
Contributor Author

I had image :

egnyte/gitlabform:1.18.3.2-alpine3.12@sha256:c369b29f197b2e5af912dcce43ad713dbac122fcb6b4253e3e8ac3f9d8993a87

but at the end I see

GitLabForm version: 1.18.0 (the latest is 1.18.3.2 - please update!)

which is suspicious. Today renovate proposed update to

`egnyte/gitlabform:1.18.3.2-alpine3.12@sha256:8e3c0cd4aed372ca9c7c79a45d40df393857f731d519053262ec14e6df349452`

will see

@grzesuav
Copy link
Contributor Author

after changing sha256 - it is working. @gdubicki can you check if accidently old version isn't present on egnyte/gitlabform:1.18.3.2-alpine3.12@sha256:c369b29f197b2e5af912dcce43ad713dbac122fcb6b4253e3e8ac3f9d8993a87

@grzesuav
Copy link
Contributor Author

yeah, doing

docker run -it --entrypoint /bin/ash egnyte/gitlabform:1.18.3.2-alpine3.12@sha256:c369b29f197b2e5af912dcce43ad713dbac122fcb6b4253e3e8ac3f9d8993a87

and then

/gitlabform/bin # ./gitlabform -V
GitLabForm version: 1.18.0 (the latest is 1.18.3.2 - please update!)

seems sth is wrong there.

@gdubicki
Copy link
Member

Thanks for investigation @grzesuav . We will check it out and fix accordingly.

@gdubicki
Copy link
Member

We had issues with building Docker images between versions 1.18.0 and 1.18.3.1.

Firstly a few versions did not build at all and what is shown as version 1.18.3.1 in Dockerhub is actually 1.18.0...

The first correctly built version is 1.8.3.2.

...BUT the problem you are seeing @grzesuav, with:

docker run -it --entrypoint /bin/ash egnyte/gitlabform:1.18.3.2-alpine3.12@sha256:c369b29f197b2e5af912dcce43ad713dbac122fcb6b4253e3e8ac3f9d8993a87

...is not caused by that, at least not directly. It looks like docker ignores the tag and ONLY takes the hash to refer to the appropriate image. :| And this is the hash of 1.18.0 = 1.18.3.1, you can check that here: https://hub.docker.com/r/egnyte/gitlabform/tags?page=1&ordering=last_updated . For example here's what happens if you use the same tag name but provide a hash of an image of v. 1.16.0:

gdubicki@mac ~ $ docker run -it --entrypoint /bin/ash egnyte/gitlabform:1.18.3.2-alpine3.12@sha256:0a76057c76419701c5918f403a2f853f8e8f7c2f47f8b10aff31edfb56400207
(...)
egnyte/gitlabform@sha256:0a76057c76419701c5918f403a2f853f8e8f7c2f47f8b10aff31edfb56400207
/config # gitlabform -V
GitLabForm version: 1.16.0 (the latest is 1.18.3.2 - please update!)

@grzesuav
Copy link
Contributor Author

interesting, thank for investigating

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

2 participants