Uploaded image for project: 'OpenShift Bugs'
  1. OpenShift Bugs
  2. OCPBUGS-1829

[Openshift Pipelines] Link to Openshift Route from service is breaking because of hardcoded value of targetPort

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done-Errata
    • Icon: Undefined Undefined
    • 4.14.0
    • 4.12, 4.11, 4.10, 4.9
    • Dev Console
    • None
    • ODC Sprint 226, ODC Sprint 231, ODC Sprint 238
    • 3
    • Rejected
    • False
    • Hide

      None

      Show
      None

      Description of problem:

      Link to Openshift Route from service is breaking because of hardcoded value of targetPort. If the targetPort gets changed, the route still points to the older value of port as it's hardcoded

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

       

      How reproducible:

      Always

      Steps to Reproduce:

      1. Install the latest available version of Openshift Pipelines
      2. Create the pipeline and triggerbinding using the attached files
      3. Add trigger to the created pipeline from devconsole UI, select the above created triggerbinding while adding trigger
      4. Trigger an event using the curl command curl -X POST -d '{ "url": "https://www.github.com/VeereshAradhya/cli" }' -H 'Content-Type: application/json' <route> and make sure that the pipelinerun gets started
      5. Update the tagetPort in the svc from 8080 to 8000
      6. Again use the above curl command to trigger one more event

      Actual results:

      The curl command throws error

      Expected results:

      The curl command should be successful and the pipelinerun should get started successfully

      Additional info:

      Error:
      curl -X POST -d '{ "url": "https://www.github.com/VeereshAradhya/cli" }' -H 'Content-Type: application/json' http://el-event-listener-3o9zcv-test-devconsole.apps.ve412psi.psi.ospqa.com
      <html>
        <head>
          <meta name="viewport" content="width=device-width, initial-scale=1">    <style type="text/css">
            body {
              font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
              line-height: 1.66666667;
              font-size: 16px;
              color: #333;
              background-color: #fff;
              margin: 2em 1em;
            }
            h1 {
              font-size: 28px;
              font-weight: 400;
            }
            p {
              margin: 0 0 10px;
            }
            .alert.alert-info {
              background-color: #F0F0F0;
              margin-top: 30px;
              padding: 30px;
            }
            .alert p {
              padding-left: 35px;
            }
            ul {
              padding-left: 51px;
              position: relative;
            }
            li {
              font-size: 14px;
              margin-bottom: 1em;
            }
            p.info {
              position: relative;
              font-size: 20px;
            }
            p.info:before, p.info:after {
              content: "";
              left: 0;
              position: absolute;
              top: 0;
            }
            p.info:before {
              background: #0066CC;
              border-radius: 16px;
              color: #fff;
              content: "i";
              font: bold 16px/24px serif;
              height: 24px;
              left: 0px;
              text-align: center;
              top: 4px;
              width: 24px;
            }      @media (min-width: 768px) {
              body {
                margin: 6em;
              }
            }
          </style>
        </head>
        <body>
          <div>
            <h1>Application is not available</h1>
            <p>The application is currently not serving requests at this endpoint. It may not have been started or is still starting.</p>      <div class="alert alert-info">
              <p class="info">
                Possible reasons you are seeing this page:
              </p>
              <ul>
                <li>
                  <strong>The host doesn't exist.</strong>
                  Make sure the hostname was typed correctly and that a route matching this hostname exists.
                </li>
                <li>
                  <strong>The host exists, but doesn't have a matching path.</strong>
                  Check if the URL path was typed correctly and that the route was created using the desired path.
                </li>
                <li>
                  <strong>Route and path matches, but all pods are down.</strong>
                  Make sure that the resources exposed by this route (pods, services, deployment configs, etc) have at least one pod running.
                </li>
              </ul>
            </div>
          </div>
        </body>
      </html>
      

      Note:

      The above scenario works fine if we create triggers using the yaml files instead of using devconsole UI

              viraj-1 Vikram Raj
              varadhya Veeresh Aradhya (Inactive)
              Sanket Pathak Sanket Pathak
              Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

                Created:
                Updated:
                Resolved: