Uploaded image for project: 'Project Quay'
  1. Project Quay
  2. PROJQUAY-926

Quay build trigger from custom git repository push get 500 error page

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Critical
    • 2020.08.20
    • quay-v3.4.0
    • quay
    • 0

    Description

      Description:

      this is an issue found when create build trigger from "custom git repository push", after provide all required git repository related configurations, click continue button, the results is redirected to quay 500 error page, check quay pod logs, get error "TypeError: Object of type 'bytes' is not JSON serializable", see quay pod logs attached.

       

      Quay Imagequay.io/projectquay/quay:40cb9ed5

      Steps:

      1. Deploy Quay env with quay build container
      2. login Quay console
      3. Create new image repository
      4. Click "Builds" tag
      5. Click button "create build trigger", choose "Custom Git Repository push"
      6. Provide all required configurations, including git repo https URL, configure tagging, select Dockerfile, etc
      7. Click Continue

       

      Expected Results:

      New build trigger should be created successfully.

      Actual Results:

      Quay redirect to error 500 page

      Quay Pod Logs:

      gunicorn-web stdout | 2020-08-04 09:32:55,625 [349] [ERROR] [gunicorn.error] Error handling request /api/v1/repository/qateam/demo/trigger/e29d76c3-f80e-425b-943f-e079ace6b15f/activate

      gunicorn-web stdout | Traceback (most recent call last):

      gunicorn-web stdout |   File "/usr/local/lib/python3.6/site-packages/gunicorn/workers/base_async.py", line 55, in handle

      gunicorn-web stdout |     self.handle_request(listener_name, req, client, addr)

      gunicorn-web stdout |   File "/usr/local/lib/python3.6/site-packages/gunicorn/workers/ggevent.py", line 143, in handle_request

      gunicorn-web stdout |     super().handle_request(listener_name, req, sock, addr)

      gunicorn-web stdout |   File "/usr/local/lib/python3.6/site-packages/gunicorn/workers/base_async.py", line 106, in handle_request

      gunicorn-web stdout |     respiter = self.wsgi(environ, resp.start_response)

      gunicorn-web stdout |   File "/usr/local/lib/python3.6/site-packages/flask/app.py", line 2463, in _call_

      gunicorn-web stdout |     return self.wsgi_app(environ, start_response)

      gunicorn-web stdout |   File "/usr/local/lib/python3.6/site-packages/werkzeug/middleware/proxy_fix.py", line 232, in _call_

      gunicorn-web stdout |     return self.app(environ, start_response)

      gunicorn-web stdout |   File "/usr/local/lib/python3.6/site-packages/flask/app.py", line 2449, in wsgi_app

      gunicorn-web stdout |     response = self.handle_exception(e)

      gunicorn-web stdout |   File "/usr/local/lib/python3.6/site-packages/flask_restful/_init_.py", line 269, in error_router

      gunicorn-web stdout |     return original_handler(e)

      gunicorn-web stdout |   File "/usr/local/lib/python3.6/site-packages/flask/app.py", line 1866, in handle_exception

      gunicorn-web stdout |     reraise(exc_type, exc_value, tb)

      gunicorn-web stdout |   File "/usr/local/lib/python3.6/site-packages/flask/_compat.py", line 38, in reraise

      ......

      21272 gunicorn-web stdout |   File "/quay-registry/endpoints/decorators.py", line 145, in wrapper

      21273 gunicorn-web stdout |     return func(*args, **kwargs)

      21274 gunicorn-web stdout |   File "/quay-registry/endpoints/api/_init_.py", line 241, in wrapper

      21275 gunicorn-web stdout |     return func(namespace, repository, *args, **kwargs)

      21276 gunicorn-web stdout |   File "/quay-registry/endpoints/decorators.py", line 120, in wrapper

      21277 gunicorn-web stdout |     return func(*args, **kwargs)

      21278 gunicorn-web stdout |   File "/quay-registry/endpoints/api/_init_.py", line 295, in wrapped

      21279 gunicorn-web stdout |     return func(self, namespace, repository, *args, **kwargs)

      21280 gunicorn-web stdout |   File "/quay-registry/endpoints/api/_init_.py", line 266, in wrapped

      21281 gunicorn-web stdout |     return func(self, namespace_name, repository_name, *args, **kwargs)

      21282 gunicorn-web stdout |   File "/quay-registry/endpoints/api/_init_.py", line 278, in wrapped

      21283 gunicorn-web stdout |     return func(self, namespace_name, repository_name, *args, **kwargs)

      21284 gunicorn-web stdout |   File "/quay-registry/endpoints/api/_init_.py", line 416, in wrapped

      21285 gunicorn-web stdout |     return func(self, *args, **kwargs)

      21286 gunicorn-web stdout |   File "/quay-registry/endpoints/api/trigger.py", line 319, in post

      21287 gunicorn-web stdout |     update_build_trigger(trigger, final_config, write_token=write_token)

      21288 gunicorn-web stdout |   File "/quay-registry/data/model/build.py", line 41, in update_build_trigger

      21289 gunicorn-web stdout |     trigger.config = json.dumps(config or {})

      21290 gunicorn-web stdout |   File "/usr/lib64/python3.6/json/_init_.py", line 231, in dumps

      21291 gunicorn-web stdout |     return _default_encoder.encode(obj)

      21292 gunicorn-web stdout |   File "/usr/lib64/python3.6/json/encoder.py", line 199, in encode

      21293 gunicorn-web stdout |     chunks = self.iterencode(o, _one_shot=True)

      21294 gunicorn-web stdout |   File "/usr/lib64/python3.6/json/encoder.py", line 257, in iterencode

      21295 gunicorn-web stdout |     return _iterencode(o, 0)

      21296 gunicorn-web stdout |   File "/usr/lib64/python3.6/json/encoder.py", line 180, in default

      21297 gunicorn-web stdout |     o._class.name_)

      21298 gunicorn-web stdout | TypeError: Object of type 'bytes' is not JSON serializable

      21299 gunicorn-web stdout | 2020-08-04 09:32:55,628 [349] [INFO] [gunicorn.access]  - - [04/Aug/2020:09:32:55 +0000] "POST /api/v1/repository/qateam/demo/trigger/e29d76c3-f80e-425b-943f-e079ace6b15f/activate HTTP/1.0" 500 0 "" ""

      Attachments

        Activity

          People

            sleesinc Kenny Lee Sin Cheong
            lzha1981 luffy zhang
            luffy zhang luffy zhang
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: