Skip to content

Fix pipeline subscription error flash message display

Michael Trainor requested to merge pipeline-subscription-flash-errors into master

What does this MR do and why?

Closes #470442

If a pipeline subscription failed to create, the errors returned can be an array of strings. The flash alert doesn't seem to render the strings in the array, so the flash alert contains blank text.

This change joins the array of strings to a single string. This approach is used elsewhere in the codebase.

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.

Before After
Screenshot_2024-07-03_at_10.00.09_AM Screenshot_2024-07-03_at_9.45.51_AM

How to set up and validate locally

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

  1. Create two new private projects: downstream and upstream
  2. Ensure you have at least Developer permissions to the upstream project
  3. In the Settings > CI/CD for the downstream project, attempt to add a Pipeline Subscription for upstream project

When bug is not fixed: Flash error shows in UI, but error text is blank.

When bug is fixed: Flash error shows in UI, and should show the Ci::Subscriptions::Project model's validation error Upstream project needs to be public.

Edited by Michael Trainor

Merge request reports