Skip to content

Replace virtual deployment status by persisted status in job detail page

What does this MR do?

This is one of the %11.5 Deliverable MRs

  1. https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/22380
  2. https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/22410
  3. This MR
  4. https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/22385
  5. https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/22388

Use persistent status instead of virtual status

Currently, we're presenting virtual deployment status in job detail page. This looks like

Screenshot_from_2018-10-16_16-29-36

Since we introduced persisted status column in https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/22380, we should replace the existing virtual status by it, in order to stick with single source of truth.

Use detailed_status for environments_block.vue, just like the other pipline and builds icon/badges/text

We use detailed_status for pipelines and builds badges/icons/etc. The concept is that BE handles the complex if-else statements and present only neccessary information to frontend.

We should adopt this culture to deployment status as well.

Sample payload

http://192.168.10.15:3000/root/stateful-deployments/-/jobs/3656.json

{
  ...
  "deployment_status": {
    "environment_text_for_pipeline": "Successfully deployed to %{environment_path}.",
    "environment_text_for_job": "This job is the most recent deployment to %{environment_path}.",
    "environment_path": "/root/stateful-deployments/environments/75",
    "deployment_path": "/root/stateful-deployments/-/jobs/3672",
    "environment_name": "review/feature-4",
    "metrics_url": null,
    "metrics_monitoring_url": "/root/stateful-deployments/environments/75/metrics",
    "stop_url": "/root/stateful-deployments/environments/75/stop",
    "external_url": "http://feature-4.my.domain.com",
    "external_url_formatted": "feature-4.my.domain.com",
    "deployed_at": "2018-10-17T08:26:16.031Z",
    "deployed_at_formatted": "Oct 17, 2018 8:26am",
  },
}

What are the relevant issue numbers?

Related: https://gitlab.com/gitlab-org/gitlab-ce/issues/25140

Does this MR meet the acceptance criteria?

Edited by Shinya Maeda

Merge request reports