Skip to content

Fix bridge policy raises an error when downstream_project is nil

What does this MR do and why?

This MR fixes RuntimeError on Projects::EnvironmentsController (#424145 - closed).

In the environment page, it serializes data for each environment, its latest deployment, and its manual actions (the other manual CI jobs that affect to the environment e.g. 15% rollout, 30% rollout, etc).

These manual actions started including bridge jobs since b4b5f918. This raises an error if the downstream project of the bridge jobs doesn't exist anymore, which is relatively edge case.

See #424145 (comment 1543046369) for more information.

Screenshots or screen recordings

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

Before After

How to set up and validate locally

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

MR acceptance checklist

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

Edited by Shinya Maeda

Merge request reports

Loading