Skip to content
Snippets Groups Projects

Fix polling on vuln details page

Merged Savas Vedova requested to merge fix-poll-on-vuln-details-page into master
All threads resolved!

What does this MR do and why?

This MR fixes a poll bug which happens when a user switches the tab. We use visibilityjs to bind a listener so that when the user puts the window into background we stop polling. Just figured out together with @dpisek that when we deregister, somehow we stop rebinding the listener.

Screenshots or screen recordings

fix-poll-bug

How to set up and validate locally

  1. Clone https://gitlab.com/gitlab-examples/security/security-reports/
  2. Run the pipeline by going into Your project > CI/CD > Pipelines
  3. Click on run pipeline for master branch
  4. Go to Security & Compliance > Vulnerability Report > Click on a Vulnerability
  5. Change the state, it will generate a history entry
  6. Switch the tab to trigger Visibility.change.

Expected behaviour: It should keep polling. Actual behaviour: It stops polling.

You should have the runner installed in order to run the pipeline. Then using the following command you can register the runner, it guides you pretty good on how to set the runner:

$ gitlab-runner register

Once it's installed this is how I run the runner:

$ gitlab-runner --log-level debug run local-runner --config ~/.gitlab-runner/config.toml restart

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • assigned to @svedova

  • Savas Vedova requested review from @dpisek

    requested review from @dpisek

  • Savas Vedova requested review from @aturinske

    requested review from @aturinske

  • A deleted user added frontend label

    added frontend label

  • 2 Warnings
    :warning: Please add a merge request type to this merge request.
    :warning: This merge request does not refer to an existing milestone.

    Reviewer roulette

    Changes that require review have been detected!

    Please refer to the table below for assigning reviewers and maintainers suggested by Danger in the specified category:

    Category Reviewer Maintainer
    frontend Ammar Alakkad (@aalakkad) (UTC+3, same timezone as @svedova) Jacques Erasmus (@jerasmus) (UTC+2, 1 hour behind @svedova)

    To spread load more evenly across eligible reviewers, Danger has picked a candidate for each review slot, based on their timezone. Feel free to override these selections if you think someone else would be better-suited or use the GitLab Review Workload Dashboard to find other available reviewers.

    To read more on how to use the reviewer roulette, please take a look at the Engineering workflow and code review guidelines. Please consider assigning a reviewer or maintainer who is a domain expert in the area of the merge request.

    Once you've decided who will review this merge request, assign them as a reviewer! Danger does not automatically notify them for you.

    If needed, you can retry the danger-review job that generated this comment.

    Generated by :no_entry_sign: Danger

  • Bundle size analysis [beta]

    This compares changes in bundle size for entry points between the commits 4090646c and 5dd1f8c1

    :sparkles: Special assets

    Entrypoint / Name Size before Size after Diff Diff in percent
    average 3.23 MB 3.23 MB +1.23 KB 0.0 %
    mainChunk 1.89 MB 1.89 MB - 0.0 %

    :fearful: Significant Growth: 2

    Expand
    Entrypoint / Name Size before Size after Diff Diff in percent
    pages.projects.packages.packages.index 768.48 KB 920.82 KB +152.34 KB 19.8 %
    pages.groups.packages.index 23.23 KB 175.05 KB +151.83 KB 653.7 %

    Your MR has at least one entrypoint growing significantly (more > 1 KB or 2%). If you write new or extend existing features, this is expected and there is nothing to worry about.

    Please consider pinging someone from the FE Foundations (@dmishunov, @justin_ho, @mikegreiling or @nmezzopera) for review, if you are unsure about the size increase.

    Note: We do not have exact data for 4090646c. So we have used data from: 5ed342ce.
    The target commit was too new, so we used the latest commit from master we have info on.
    It might help to rerun the bundle-size-review job
    This might mean that you have a few false positives in this report. If something unrelated to your code changes is reported, you can check this comparison in order to see if they caused this change.

    Please look at the full report for more details


    Read more about how this report works.

    Generated by :no_entry_sign: Danger

  • Allure report

    allure-report-publisher generated test report for 5dd1f8c1!

    review-qa-smoke: :pencil: test report

  • Savas Vedova removed review request for @dpisek

    removed review request for @dpisek

  • Savas Vedova
  • Alexander Turinske
  • Alexander Turinske
  • Setting label groupthreat insights based on @svedova's group.

  • David Pisek mentioned in issue #228746

    mentioned in issue #228746

  • Alexander Turinske approved this merge request

    approved this merge request

  • Alexander Turinske requested review from @kushalpandya and removed review request for @aturinske

    requested review from @kushalpandya and removed review request for @aturinske

  • :wave: @aturinske, thanks for approving this merge request.

    This is the first time the merge request is approved. To ensure full test coverage, a new pipeline has been started.

    For more info, please refer to the following links:

  • Kushal Pandya approved this merge request

    approved this merge request

  • Kushal Pandya resolved all threads

    resolved all threads

  • merged

  • Kushal Pandya mentioned in commit 511876d1

    mentioned in commit 511876d1

  • added workflowcanary label and removed workflowstaging label

  • added workflowproduction label and removed workflowcanary label

  • Please register or sign in to reply
    Loading