Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-36638

SSE events not coming through to the client

    Details

    • Epic Link:
    • Sprint:
      1.0-m11, 1.0-m12
    • Similar Issues:

      Description

      Looks like SSE is acting a bit dodgy again.

      Steps to reproduce
      1. Open up the Activity tab of a pipeline in one tab
      2. Open a new browser tab and run the same pipeline
      3. You don't see the new run appear in the first tab

      I watched in classic to ensure that it was in the running state so it is not JENKINS-36209

      Not sure if related - there is an error in the console:

      GET https://ci.blueocean.io/sse-gateway/listen/jenkins_blueocean net::ERR_INCOMPLETE_CHUNKED_ENCODING

        Attachments

          Issue Links

            Activity

            Hide
            tfennelly Tom FENNELLY added a comment -

            Fairly sure the ERR_INCOMPLETE_CHUNKED_ENCODING error in the console has nothing to do with the error described in the description. The ERR_INCOMPLETE_CHUNKED_ENCODING will go away once we do JENKINS-35175.

            Show
            tfennelly Tom FENNELLY added a comment - Fairly sure the ERR_INCOMPLETE_CHUNKED_ENCODING error in the console has nothing to do with the error described in the description. The ERR_INCOMPLETE_CHUNKED_ENCODING will go away once we do JENKINS-35175 .
            Hide
            tfennelly Tom FENNELLY added a comment -

            Would be good to know if this error happens locally, or just on ci.blueocean.io. I wonder if it's related to the scenario described in JENKINS-36238.

            Show
            tfennelly Tom FENNELLY added a comment - Would be good to know if this error happens locally, or just on ci.blueocean.io. I wonder if it's related to the scenario described in JENKINS-36238 .
            Hide
            jamesdumay James Dumay added a comment -

            I saw this on blueocean.io but did not test it locally

            Show
            jamesdumay James Dumay added a comment - I saw this on blueocean.io but did not test it locally
            Hide
            cliffmeyers Cliff Meyers added a comment -

            This may not be the right ticket for this comment but I want to be sure to capture it. Are we sure that the SSE events aren't actually coming through, or is it that the UI just isn't updating itself?

            While debugging JENKINS-36615 I noticed some issues with UI updates. SEE events were coming through ok after a run, but the UI was not updating. The SSE event we receive for a nested job looks like this:

            {
                "jenkins_object_type": "org.jenkinsci.plugins.workflow.job.WorkflowJob",
                "job_run_status": "QUEUED",
                "job_name": "myfolder/blueocean-demo-project/feature%2Fnewhotness",
                "jenkins_org": "jenkins",
                "job_run_queueId": "23",
                "job_ismultibranch": "true",
                "jenkins_object_name": "myfolder/blueocean-demo-project/feature%2Fnewhotness",
                "blueocean_job_rest_url": "/rest/organizations/jenkins/pipelines/blueocean-demo-project/branches/feature%2Fnewhotness/",
                "blueocean_job_branch_name": "feature%2Fnewhotness",
                "jenkins_event": "job_run_queue_enter",
                "blueocean_job_pipeline_name": "blueocean-demo-project",
                "jenkins_object_url": "job/myfolder/job/blueocean-demo-project/job/feature%252Fnewhotness/",
                "jenkins_channel": "job"
            }
            

            Right now this fails to update the UI because our UI logic refers to a pipeline by its fullName (which includes the folder) but our "blueocean_" props don't include the folder name. I also am not sure whether any of the comparisons on branch name are correct escaped right now. The "blueocean_job_rest_url" is also incorrect. The branch name needs to be escaped a second time. I also think that "blue" should be prepended on the front of the URL because that's how the HAL links are formatted.

            What I think we need to do is ensure that the REST URL is formatted the same as the HAL links, and then do all of our comparisons against that value.

            Show
            cliffmeyers Cliff Meyers added a comment - This may not be the right ticket for this comment but I want to be sure to capture it. Are we sure that the SSE events aren't actually coming through, or is it that the UI just isn't updating itself? While debugging JENKINS-36615 I noticed some issues with UI updates. SEE events were coming through ok after a run, but the UI was not updating. The SSE event we receive for a nested job looks like this: { "jenkins_object_type" : "org.jenkinsci.plugins.workflow.job.WorkflowJob" , "job_run_status" : "QUEUED" , "job_name" : "myfolder/blueocean-demo-project/feature%2Fnewhotness" , "jenkins_org" : "jenkins" , "job_run_queueId" : "23" , "job_ismultibranch" : " true " , "jenkins_object_name" : "myfolder/blueocean-demo-project/feature%2Fnewhotness" , "blueocean_job_rest_url" : "/ rest /organizations/jenkins/pipelines/blueocean-demo-project/branches/feature%2Fnewhotness/" , "blueocean_job_branch_name" : "feature%2Fnewhotness" , "jenkins_event" : "job_run_queue_enter" , "blueocean_job_pipeline_name" : "blueocean-demo-project" , "jenkins_object_url" : "job/myfolder/job/blueocean-demo-project/job/feature%252Fnewhotness/" , "jenkins_channel" : "job" } Right now this fails to update the UI because our UI logic refers to a pipeline by its fullName (which includes the folder) but our "blueocean_" props don't include the folder name. I also am not sure whether any of the comparisons on branch name are correct escaped right now. The "blueocean_job_rest_url" is also incorrect. The branch name needs to be escaped a second time. I also think that "blue" should be prepended on the front of the URL because that's how the HAL links are formatted. What I think we need to do is ensure that the REST URL is formatted the same as the HAL links, and then do all of our comparisons against that value.
            Hide
            tfennelly Tom FENNELLY added a comment -

            Cliff Meyers Are we sure that the SSE events aren't actually coming through, or is it that the UI just isn't updating itself?

            Well it may not be ... in general, any error in the UI where things do not refresh properly gets logged in JIRA as "SSE is broken ....", so I just tend to read these JIRAs as "something is not refreshing in the UI" and it needs to be investigated to see what the real issue is.

            Wrt the job url in the event message, that URL is coming from temp code in BlueMessageEnricher while we were waiting on JENKINS-36286 to be done. I added a comment wrt that in JENKINS-36615.

            Show
            tfennelly Tom FENNELLY added a comment - Cliff Meyers Are we sure that the SSE events aren't actually coming through, or is it that the UI just isn't updating itself? Well it may not be ... in general, any error in the UI where things do not refresh properly gets logged in JIRA as "SSE is broken ....", so I just tend to read these JIRAs as "something is not refreshing in the UI" and it needs to be investigated to see what the real issue is. Wrt the job url in the event message, that URL is coming from temp code in BlueMessageEnricher while we were waiting on JENKINS-36286 to be done. I added a comment wrt that in JENKINS-36615 .
            Hide
            cliffmeyers Cliff Meyers added a comment -

            Tom FENNELLY I believe you are back tomorrow? I can touch base w/ you then as to what I am working on. JENKINS-33615 has some bugs and regressions dealing with nested jobs and branch names with special chars in them. That may effectively resolve this bug.

            Show
            cliffmeyers Cliff Meyers added a comment - Tom FENNELLY I believe you are back tomorrow? I can touch base w/ you then as to what I am working on. JENKINS-33615 has some bugs and regressions dealing with nested jobs and branch names with special chars in them. That may effectively resolve this bug.
            Hide
            michaelneale Michael Neale added a comment -

            Wasn't reproduced locally and likely due to unupdated plugins on dogfood.

            It is critical to reproduce things locally. If there is a problem with SSE and proxies it shoudl be clear and proven that is the case.

            Show
            michaelneale Michael Neale added a comment - Wasn't reproduced locally and likely due to unupdated plugins on dogfood. It is critical to reproduce things locally. If there is a problem with SSE and proxies it shoudl be clear and proven that is the case.

              People

              • Assignee:
                tfennelly Tom FENNELLY
                Reporter:
                jamesdumay James Dumay
              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: