Skip to content

Decouple mr widget extension flag from license compliance

- requested to merge 373020-fix-license-compliance-flag into master

What does this MR do and why?

Previously, if the :refactor_mr_widgets_extension flag was disabled, then we would show the legacy widget. It was removed in !96948 (merged) as part of code cleanup efforts.

Now when the flag is off, we render nothing, which breaks automation tests for when all flags are on or off. We now want this new widget always on, so we decouple it from the rest of the widget extensions, since those have not yet removed their legacy widgets.

Screenshots or screen recordings

Before After
Screen_Shot_2022-09-12_at_1.10.51_PM https://gitlab.com/gitlab-org/gitlab/uploads/1e4db1ea788146424c370afe1e3986f5/Screen_Shot_2022-08-10_at_3.07.06_PM.png

How to set up and validate locally

  • Reach out to me for a demo, or attempt steps below
  • In a rails console enable flag Feature.enable(:refactor_mr_widgets_extensions)
  • Clone the https://gitlab.com/gitlab-examples/security/security-reports project locally
  • Manually trigger the pipeline to run for Master. This can be done by going to the CI/CD -> Pipelines tab on the left nav and then clicking the Run Pipeline button.
  • Set up Allowed/Denied licenses in https://<localhost>/<group>/<project>/-/licenses#policies
  • Create a new MR. I suggest changing something simple like a letter or two in the README.md file. We just need a pipeline to complete and run. The sample project uses test reports to generate the data so doesn't matter what you change just need a MR.
  • Go to the MR and look for the license compliance widget
  • In a rails console disable flag Feature.disable(:refactor_mr_widgets_extensions)
  • Refresh the page a few times, you should still see the MR widget

MR acceptance checklist

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

Related to #373020 (closed)

Edited by -

Merge request reports

Loading