Skip to content

Protected packages: Show alert message on fetching error

What does this MR do and why?

Protected packages: Show alert message on fetching error

  • Showing error message in alert when fetching package protection rules fails
  • Removing unnecessary state variable fetchSettingsError

🛠 with at Siemens

MR acceptance checklist

Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

MR Checklist (@gerardo-navarro)

Screenshots or screen recordings

When an error occurs while fetching the package protection rules, then we show this alert with the message.

grafik

How to set up and validate locally

  1. Create some package protections rule via rails c
25.times { |i| Packages::Protection::Rule.create(project: Project.find(7), package_name_pattern: "flightjs/flight-#{i}", push_protected_up_to_access_level: :maintainer) }
  1. Go to http://gdk.test:3000/flightjs/Flight/-/settings/packages_and_registries
  2. In the network of the browser's dev tools, you can disable networking (top right)
  3. Click on the button "Next" in the pagination navigation to load the next page
  4. You should see the alert message appear

Related to #413641

Edited by Gerardo Navarro

Merge request reports