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

Activity tab for multibranch pipeline doesn't display new runs when branch filtering is active

      When viewing the Activity tab for a multibranch pipeline, the runs list will not update with new runs while branch filtering is active. This might only apply to branches that contain slashes in the name.

      Repro Steps

      1. Open activity tab for a multibranch pipeline in two different tabs
        1. Note that this might be more reproducible using branches with git-flow naming style
      2. In Tab B, replay a branch. Note that in Tab A, the run appears.
      3. In Tab A, apply filtering for that branch.
      4. In Tab B, replay that branch again. Note the run appears in Tab B.

      Expected Behavior

      • Second run should appear in Tab A

      Actual Behavior

      • Second run does not appear in Tab B.
        • Note that clearing the branch filter should display the run that was previously hidden.

      Notes

      • You can probably do this testing in a single tab and still see the issue.
      • Might be able to write a unit test for this against the Activity component but may be challenging.
      • ATH shouldn't be too difficult to write.

        1. screenshot-1.png
          screenshot-1.png
          442 kB
        2. screenshot-10.png
          screenshot-10.png
          495 kB
        3. screenshot-2.png
          screenshot-2.png
          436 kB
        4. screenshot-3.png
          screenshot-3.png
          332 kB
        5. screenshot-4.png
          screenshot-4.png
          441 kB
        6. screenshot-5.png
          screenshot-5.png
          466 kB
        7. screenshot-6.png
          screenshot-6.png
          334 kB
        8. screenshot-7.png
          screenshot-7.png
          387 kB
        9. screenshot-8.png
          screenshot-8.png
          503 kB
        10. screenshot-9.png
          screenshot-9.png
          490 kB

          [JENKINS-48066] Activity tab for multibranch pipeline doesn't display new runs when branch filtering is active

          Cliff Meyers added a comment -

          cc kshultz curious whether you can repro this, and feel free to add additional testing notes.

          Cliff Meyers added a comment - cc kshultz curious whether you can repro this, and feel free to add additional testing notes.

          Karl Shultz added a comment - - edited

          cliffmeyers - I've tried this now, and can confirm some simliar behaviors with filtering, but for me, it's the opposite. Applying a filter shows the runs, and removing it deletes them. Here's how I did it.

          Environment:

          • Blue Ocean 1.3.2, Jenkins core 2.89
          • "Tab B" is the rightmost tab in these screenshots. "Tab A" is second-from-rightmost.

          1. I've got a repo on GitHub Enterprise, and just saved its Jenkinsfile to a new branch, which I called "48066." Shown here on Tab B are its first run, and the replay:

          2. On Tab A, only the initial run gets displayed. Not only that, it's still animating, as if it's building still:

          3. Applying a filter to Tab A (the one with the missing run), reveals the second run. And it updates the status of both of them to where they're no longer animating:

          4. But when I clear the filter on Tab A, the run which used to be visible while the filter was applied, is gone again:

          I think you're right, that an ATH test would be pretty easy to implement.

          Great find.

          Karl Shultz added a comment - - edited cliffmeyers - I've tried this now, and can confirm some simliar behaviors with filtering, but for me, it's the opposite. Applying a filter shows the runs, and removing it deletes them. Here's how I did it. Environment: Blue Ocean 1.3.2, Jenkins core 2.89 "Tab B" is the rightmost tab in these screenshots. "Tab A" is second-from-rightmost. 1. I've got a repo on GitHub Enterprise, and just saved its Jenkinsfile to a new branch, which I called "48066." Shown here on Tab B are its first run, and the replay: 2. On Tab A, only the initial run gets displayed. Not only that, it's still animating, as if it's building still: 3. Applying a filter to Tab A (the one with the missing run), reveals the second run. And it updates the status of both of them to where they're no longer animating: 4. But when I clear the filter on Tab A, the run which used to be visible while the filter was applied, is gone again: I think you're right, that an ATH test would be pretty easy to implement. Great find.

          Cliff Meyers added a comment -

          Appreciate the insights kshultz. Will wait for triage by product to decide when we tackle this. It feels like at least Major to me.

          Cliff Meyers added a comment - Appreciate the insights kshultz . Will wait for triage by product to decide when we tackle this. It feels like at least Major to me.

          Karl Shultz added a comment -

          Testing Notes:

          • An automated UI test to validate the correct function of the branch name filter in the Activity tab should be implemented. Create a new Pipeline, use the editor to create some branches, build them, and turn various filters on and off. Verify for the correct presence, or absence, of branch names.

          Karl Shultz added a comment - Testing Notes: An automated UI test to validate the correct function of the branch name filter in the Activity tab should be implemented. Create a new Pipeline, use the editor to create some branches, build them, and turn various filters on and off. Verify for the correct presence, or absence, of branch names.

          Cliff Meyers added a comment -

          A note on the testing notes: I might suggest that the pipeline and branches should be created programmatically (via REST API) if possible to keep the scope of the UI interactions narrow. The longer and more complex we make the UI flows, the more likely they will flake. Now that the "HttpRequest" class is available to the ATH module, we should leverage it to keep the ATH streamlined. Possibly even write a "BlueApi" wrapper class to simplify things even more, like we have for "ClassicJobApi". here's an example of HttpRequest usage: https://github.com/jenkinsci/blueocean-plugin/commit/ba332992e9605918962e5b4d6556a40f538054fd#diff-ba501cb4fd8fd24e71435ea2aa3bc881R82

          Cliff Meyers added a comment - A note on the testing notes: I might suggest that the pipeline and branches should be created programmatically (via REST API) if possible to keep the scope of the UI interactions narrow. The longer and more complex we make the UI flows, the more likely they will flake. Now that the "HttpRequest" class is available to the ATH module, we should leverage it to keep the ATH streamlined. Possibly even write a "BlueApi" wrapper class to simplify things even more, like we have for "ClassicJobApi". here's an example of HttpRequest usage: https://github.com/jenkinsci/blueocean-plugin/commit/ba332992e9605918962e5b4d6556a40f538054fd#diff-ba501cb4fd8fd24e71435ea2aa3bc881R82

          Karl Shultz added a comment -

          cliffmeyers that's a fair point about not making ATH tests overly fancy.

          I stumbled into a different take on the same sort of problem today. Didn't seem like it warranted its own issue, and might give weight to this issue getting worked on for 1.4.

          1. Look at a project in Blue Ocean, at the Activity tab.

          2. Bring that most recent successful run up, then edit its Jenkinsfile in the editor. In this case I've removed one of two sets of parallel stages:

          3. Save this to a new branch:

          4. You'll be taken back to the Activity page, which is great. And you'll see the successful run, which is also great. But put your cursor in the Branches filter, and look for the branch you just created. It's not there:

          5. If you put in a single character which you know should result in you seeing the new branch (in this example, the `r`), that also won't get it to show up:

          6. But if you do a full page refresh manually, it'll show up.

          This instance is running BO 1.3.3, and core 2.91 now. Haven't tried any of this from local builds from master, but I'm happy to if it would be helpful.

          Karl Shultz added a comment - cliffmeyers that's a fair point about not making ATH tests overly fancy. I stumbled into a different take on the same sort of problem today. Didn't seem like it warranted its own issue, and might give weight to this issue getting worked on for 1.4. 1. Look at a project in Blue Ocean, at the Activity tab. 2. Bring that most recent successful run up, then edit its Jenkinsfile in the editor. In this case I've removed one of two sets of parallel stages: 3. Save this to a new branch: 4. You'll be taken back to the Activity page, which is great. And you'll see the successful run, which is also great. But put your cursor in the Branches filter, and look for the branch you just created. It's not there: 5. If you put in a single character which you know should result in you seeing the new branch (in this example, the `r`), that also won't get it to show up: 6. But if you do a full page refresh manually, it'll show up. This instance is running BO 1.3.3, and core 2.91 now. Haven't tried any of this from local builds from master, but I'm happy to if it would be helpful.

            Unassigned Unassigned
            cliffmeyers Cliff Meyers
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: