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

[3.15] Issue with Email Notifications for Repository Names Containing Slashes ("/") in Quay

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Undefined Undefined
    • None
    • quay-v3.10.6
    • quay-operator
    • False
    • Hide

      None

      Show
      None
    • False
    • Moderate

       

      Repository names containing slashes (e.g., "example/mydebian") work correctly for pull, push, and other operations in Quay.
      However, email notifications fail when these repositories are involved.

      Error Details:

       

      notificationworker stdout | 2024-07-22 15:37:56,165 [80] [ERROR] [workers.worker] Operation raised exception
      notificationworker stdout | Traceback (most recent call last):
      notificationworker stdout |   File "/quay-registry/workers/worker.py", line 86, in _operation_func
      notificationworker stdout |     return operation_func()
      notificationworker stdout |   File "/quay-registry/workers/queueworker.py", line 134, in poll_queue
      notificationworker stdout |     self.process_queue_item(job_details)
      notificationworker stdout |   File "/quay-registry/workers/notificationworker/notificationworker.py", line 41, in process_queue_item
      notificationworker stdout |     method_handler.perform(notification, event_handler, job_details)
      notificationworker stdout |   File "/quay-registry/notifications/notificationmethod.py", line 182, in perform
      notificationworker stdout |     msg.html = event_handler.get_message(notification_data["event_data"], notification_data)
      notificationworker stdout |   File "/quay-registry/notifications/notificationevent.py", line 41, in get_message
      notificationworker stdout |     return TEMPLATE_ENV.get_template(self.event_name() + ".html").render(
      notificationworker stdout |   File "/app/lib/python3.9/site-packages/jinja2/environment.py", line 1301, in render
      notificationworker stdout |     self.environment.handle_exception()
      notificationworker stdout |   File "/app/lib/python3.9/site-packages/jinja2/environment.py", line 936, in handle_exception
      notificationworker stdout |     raise rewrite_traceback_stack(source=source)
      notificationworker stdout |   File "events/repo_push.html", line 9, in top-level template code
      notificationworker stdout |     {% for tag in event_data.updated_tags %}{%if loop.index > 1 %}, {% endif %}{{ (event_data.repository, tag) | repository_tag_reference }}{% endfor %} in
      notificationworker stdout |   File "/quay-registry/util/jinjautil.py", line 51, in repository_tag_reference
      notificationworker stdout |     (namespace, repository) = repository_path.split("/")
      notificationworker stdout | ValueError: too many values to unpack (expected 2)

       

       

      Log Error: The log shows an error in util/jinjautil.py on line 51.
      Error Cause: The split("/") function in the code expects exactly 2 parts (organization and repository), but it encounters 3 parts ("myorganization/example/mydebian").
      Specific Error: ValueError: too many values to unpack (expected 2)

      Discussion started at https://github.com/quay/quay/discussions/3069

              Unassigned Unassigned
              rhn-support-rmypala Rachitha Mypala
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated: