Skip to content

Update scan execution rule mode errors

Alexander Turinske requested to merge 428693-partially-disable-rule-mode into master

What does this MR do and why?

Update how scan execution rule mode gets disabled

  • currently we disable all of rule mode if there is an error in the yaml validation the frontend does
  • now we will only partially disable rule mode based on where the error in the yaml is (e.g. if there is a problem in the actions, only disable the actions section in rule mode)
  • currently we disable rule mode when there are properties in the yaml that are not supported, but now we will not because adding these properties does not affect rule mode. I don't remember why we even did this in the first place, but I think it is unnecessary and makes it harder to iterate if the backend adds a new property that they frontend hasn't accounted for yet.
  • no change has been made to the error text; that will come in [Frontend] Improve from yaml validation (#470868)

Changelog: changed

EE: true

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.

Screenshots or screen recordings

Screenshots are required for UI changes, and strongly recommended for all other merge requests.

Scenario Screenshot
Before before
Disables sections and shows alert disabled_-_a

How to set up and validate locally

Numbered steps to set up and validate the change are strongly suggested.

  1. Upload a GitLab Ultimate license
  2. Navigate to a project => Secure => Policies => New policy => Scan execution
  3. Navigate to yaml mode and mess around with the yaml
  4. Navigate to rule mode and see that only part of it is disabled

Related to #428693 (closed)

Edited by Alexander Turinske

Merge request reports

Loading