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

Don't fetch run data on an event if it not already in the store

XMLWordPrintable

    • Icon: Task Task
    • Resolution: Unresolved
    • Icon: Minor Minor
    • blueocean-plugin
    • None
    • b23

      This ticket started life as a bug, after observing what was thought to be a regression.

      The BlueOcean main pipeline screen (https://ci.blueocean.io/blue/pipelines) appears to be receiving events for running pipelines that are not visible, and then fetching data, creating more than expected traffic.

      On a regular basis this sends event from the backend to the frontend detailing things that are running.

      To reproduce

      Expected behavior:

      • Should not fetch the run data if the job isn't even in the store.

      Some details

      Event socket:
      https://ci.blueocean.io/sse-gateway/listen/jenkins-blueocean-core-js-1487311928759-80shtgg3w8q5hpelba9k9

      Event data:

      open  {"dispatcherId":"jenkins-blueocean-core-js-1487311928759-80shtgg3w8q5hpelba9k9","dispatcherInst":1238701885}  
      16:15:00.445
      job {"jenkins_object_type":"org.jenkinsci.plugins.workflow.job.WorkflowRun","jenkins_event_uuid":"6c1358f1-f887-41bb-beb9-3228dda99df8","sse_subs_dispatcher_inst":"1238701885","job_run_status":"SUCCESS","job_name":"scratch/bwalding-alwaysBlue","jenkins_org":"jenkins","job_run_queueId":"5246","jenkins_object_name":"#2","blueocean_job_rest_url":"/blue/rest/organizations/jenkins/pipelines/scratch/pipelines/bwalding-alwaysBlue/","jenkins_object_id":"2","jenkins_event":"job_run_ended","sse_subs_dispatcher":"jenkins-blueocean-core-js-1487311928759-80shtgg3w8q5hpelba9k9","blueocean_job_pipeline_name":"scratch/bwalding-alwaysBlue","jenkins_object_url":"job/scratch/job/bwalding-alwaysBlue/2/","jenkins_channel":"job"} 
      

      Once the frontend receives those events, the frontend then makes a call to retrieve details about the run.

      https://ci.blueocean.io/blue/rest/organizations/jenkins/pipelines/scratch/pipelines/bwalding-alwaysBlue/runs/2/

      However the important thing to note is that the bwalding-alwaysBlue job is not visible on the front screen - so the frontend is querying the backend for details on jobs that will not change the state of the front end (afaik)

      In a large instance that is running a lot of jobs all the time, this could be problematic.

            tfennelly Tom FENNELLY
            bwalding Ben Walding
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated: