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

Create new image repo notifications with invalid method by API failed

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Won't Do
    • Icon: Minor Minor
    • None
    • quay-v3.7.0
    • quay
    • False
    • None
    • False
    • 0

      Description of problem:

      When create new image repo notifications with invalid method by API,  response is "Internal Server Error"

      Version-Release number of selected component (if applicable):

      build   quay-operator-bundle-container-v3.7.0-93

      Index image v4.8: registry-proxy.engineering.redhat.com/rh-osbs/iib:219768

      quay-operator-rhel8@sha256:2875719b7c4c0e17dce97bc8ee42c15b0c2ec6e8cafca8a1580423b1c52f8890

       

      How reproducible:

      always

      Steps to Reproduce:

      • The request we sent was:
        Method: POST
        URL: https://quayregistry-quay-quay-enterprise.apps.whu48az3.qe.azure.devcluster.openshift.com/api/v1/repository/quayorg3641458163347761/imagerepo3641458163347761/notification/
        Headers: {
          "Connection": "keep-alive",
          "authorization": "Bearer N2PDN5OmV4HdF1fGLxUueAUWjT8ZczBNtjytdZ9m",
          "Content-Type": "application/json",
          "user-agent": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.110 Safari/537.36",
          "accept": "/",
          "accept-encoding": "gzip, deflate",
          "content-length": 79
        }
        Body: {"eventConfig":{},"title":"hello","config":{},"event":"hello","method":"hello"}

        Actual results:

      The response we got was:

      Status: 500 - Internal Server Error
      Headers: {
        "server": "nginx/1.14.1",
        "date": "Fri, 22 Apr 2022 07:28:43 GMT",
        "content-type": "text/html",
        "content-length": "141",
        "set-cookie": [
          "2ed6f763f79efabe9e0e1a3e51456b5b=bfde60bd9540491cf4aa5cf6cfed672a; path=/; HttpOnly; Secure; SameSite=None"
        ]
      }
      Body: <html>
        <head>
          <title>Internal Server Error</title>
        </head>
        <body>
          <h1><p>Internal Server Error</p></h1>
          
        </body>
      </html>Learn more

      Expected results:

      should return 400

      Additional info:

      The API path "/api/v1/repository/{repository}/notification/"' definition:

       

      $ curl -k https://quayregistry-quay-quay-enterprise.apps.whu48az4.qe.azure.devcluster.openshift.com/api/v1/discovery |jq '.paths."/api/v1/repository/{repository}/notification/"'
      {
        "x-name": "endpoints.api.repositorynotification.RepositoryNotificationList",
        "x-path": "/api/v1/repository/{repository}/notification/",
        "x-tag": "repositorynotification",
        "parameters": [
          {
            "name": "repository",
            "in": "path",
            "required": true,
            "description": "The full path of the repository. e.g. namespace/name",
            "type": "string"
          }
        ],
        "post": {
          "operationId": "createRepoNotification",
          "parameters": [
            {
              "name": "repository",
              "in": "path",
              "required": true,
              "description": "The full path of the repository. e.g. namespace/name",
              "type": "string"
            },
            {
              "name": "body",
              "in": "body",
              "required": true,
              "description": "Request body contents.",
              "schema": {
                "$ref": "#/definitions/NotificationCreateRequest"
              }
            }
          ],
          "description": "",
          "tags": [
            "repositorynotification"
          ],
          "security": [
            {
              "oauth2_implicit": [
                "repo:admin"
              ]
            }
          ],
          "responses": {
            "400": {
              "description": "Bad Request",
              "schema": {
                "$ref": "#/definitions/ApiError"
              }
            },
            "401": {
              "description": "Session required",
              "schema": {
                "$ref": "#/definitions/ApiError"
              }
            },
            "403": {
              "description": "Unauthorized access",
              "schema": {
                "$ref": "#/definitions/ApiError"
              }
            },
            "404": {
              "description": "Not found",
              "schema": {
                "$ref": "#/definitions/ApiError"
              }
            },
            "201": {
              "description": "Successful creation"
            }
          }
        },
        "get": {
          "operationId": "listRepoNotifications",
          "parameters": [
            {
              "name": "repository",
              "in": "path",
              "required": true,
              "description": "The full path of the repository. e.g. namespace/name",
              "type": "string"
            }
          ],
          "description": "List the notifications for the specified repository.",
          "tags": [
            "repositorynotification"
          ],
          "security": [
            {
              "oauth2_implicit": [
                "repo:admin"
              ]
            }
          ],
          "responses": {
            "400": {
              "description": "Bad Request",
              "schema": {
                "$ref": "#/definitions/ApiError"
              }
            },
            "401": {
              "description": "Session required",
              "schema": {
                "$ref": "#/definitions/ApiError"
              }
            },
            "403": {
              "description": "Unauthorized access",
              "schema": {
                "$ref": "#/definitions/ApiError"
              }
            },
            "404": {
              "description": "Not found",
              "schema": {
                "$ref": "#/definitions/ApiError"
              }
            },
            "200": {
              "description": "Successful invocation"
            }
          }
        }
      }
      

       

            Unassigned Unassigned
            rhwhu Weihua Hu
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: