Fix related environments on pipeline
What does this MR do and why?
In !71894 (merged), we've fixed the environments_in_self_and_descendants
for DB decomposition. However, since the new query fetches an empty environment, it could result in 500 error or unexpected UX issue. This MR fixes the problem to fetch non-empty environments, just like it used to be.
Close #345659 (closed)
Screenshots or screen recordings
Before the fix (avoid_cross_joins_environments_in_self_and_descendants
must be enabled)
After the fix
How to set up and validate locally
Run a pipeline with the following change:
build-deployment:
script: echo
environment:
name: production
action: prepare # This does not create a deployment record, but only environment record.
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Edited by Shinya Maeda