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
- https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/22380
- https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/22410
- This MR
- https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/22385
- 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
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.
detailed_status
for environments_block.vue, just like the other pipline and builds icon/badges/text
Use 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?
-
Changelog entry added, if necessary -
Documentation created/updated -
Tests added for this feature/bug -
Conforms to the code review guidelines -
Conforms to the merge request performance guidelines -
Conforms to the style guides -
Conforms to the database guides
Edited by Shinya Maeda