Skip to content

Restrict branch and environment wildcards to include '*'

Mireya Andres requested to merge wildcard-restriction into master

What does this MR do and why?

Implements #480111 (closed).

This addresses a follow-up from !161866 (comment 2064565331):

It seems like our wildcard doesn't require * to create one.

image.png

This applies to:

  • Environment scope dropdown (Secrets Manager, CI/CD Settings) (docs)
  • Branches dropdown (Secrets Manager) (docs).

These dropdowns now only allow the user to create a wildcard environment/branch if the * character is included in the search term.

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

Secrets Manager

Before After (without *) After (with *)
Screenshot_2024-09-02_at_16.05.30 Screenshot_2024-09-02_at_16.05.39 Screenshot_2024-09-02_at_16.05.44

CI/CD Settings > Variables

Screenshot_2024-09-02_at_16.09.34

How to set up and validate locally

  1. Enable the feature flag.
    Feature.enable(:ci_tanukey_ui)
  2. Visit the Secrets Manager form. <path-to-project>/-/secrets/new
  3. Verify that the Environments and Branches field will only show the Create wildcard button if there is a * character in the search string and if there are no search results to show.
    • This also applies to the Environments dropdown in the CI/CD Settings > Variables > Add variable form.

Merge request reports

Loading