Skip to content

Limit number of shown environments

Kamil Trzcińśki requested to merge limit-number-of-shown-environments into master

What does this MR do?

This MR limits in context of Merge Request a list of shown environments. Previously we would show all environments containing the SHA of the head commit of Merge Request. However, with introducing of dynamically created environments this lead to a cases that we would show multiple review apps, for different branches, because these branches would contain a new questioned commit.

This MR changes what environments we test against presence of the commit, to:

  1. We look for environments with deployments to source_branch of source_project: used for deployments to per-branch environments,
  2. We look for environments with deployments to target_branch of target_project: used for deployments to staging / production environments,
  3. We look for environments with deployments for tags on target_project: used for staging / production environments.

Why was this MR needed?

To improve a list of returned environments when we introduced ability to create dynamic environments for review apps: https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/6323

Screenshots (if relevant)

This allows us to limit this list: Screen_Shot_2016-09-21_at_12.18.37

To: Screen_Shot_2016-09-21_at_12.14.58

Does this MR meet the acceptance criteria?

What are the relevant issue numbers?

None yet, but they would be created when users would start using review apps.

Merge request reports

Loading