Add deployment approval UI MVC
What does this MR do and why?
Sets up the ability for users to approve and reject deployments from within the environments page.
Current information shown is how many approvals are needed and how many are done, as well as who has approved and when.
A rejection short cuts to killing the deployment.
This is currently only in the phased out environment UI, but built in a way that it should be easy to drop into the new one.
Screenshots or screen recordings
Screencast_2022-03-07_14_53_04
Screencast_2022-03-07_14_53_55
How to set up and validate locally
- Enable runners in your GDK/Gitpod -- see instructions
- Enable the new environment table
Feature.enable(:new_environments_table)
- Then add the following
.gitlab-ci.yml
to a project for some deployments:
stages:
- deploy
- stop
image: alpine:latest
deploy-prod:
stage: deploy
script:
- sleep 6000
- echo "deploying prod"
environment:
name: production
deploy-staging:
stage: deploy
script:
- echo "deploying staging"
environment:
name: staging
url: https://example.com
when: manual
deploy-review:
stage: deploy
script:
- echo "Deploying review/$CI_COMMIT_REF_NAME"
environment:
name: review/$CI_COMMIT_REF_NAME
auto_stop_in: 1 week
only:
- branches
except:
- main
stop_review_app:
script: stop-review-app
stage: stop
environment:
name: review/$CI_COMMIT_REF_SLUG
action: stop
rules:
- if: $CI_MERGE_REQUEST_ID
when: manual
Run a pipeline to create the initial environments, then protect the staging
environment in Settings > CI/CD.
Run another pipeline, and check the environments page.
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.
For #342180 (closed)
Merge request reports
Activity
assigned to @afontaine
- Resolved by Andrew Fontaine
@dfosco here is the initial bit of the approval UI.
I'm still waiting on a few details from the backend, and the new UI will come later, but please check it out!
The behaviour is a little wonky, and will stay that way until the final backend details get filled in.
I dropped the bottom grey background, as it was too finicky to make look nicely with the built in paddings on
GlPopover
Edited by Andrew Fontaine
requested review from @dfosco
mentioned in issue #342180 (closed)
Allure report
allure-report-publisher
generated test report for d39dff98!review-qa-reliable:
test report
review-qa-smoke: test reportmentioned in merge request !80440 (merged)
added grouprelease [DEPRECATED] label
Setting label(s) ~"devops::release" sectionops based on ~"group::release".
added devopsrelease [DEPRECATED] sectionops labels
added 768 commits
-
871914df...ef4be671 - 760 commits from branch
master
- cdbe32a0 - Add pending_approval_count to deployment entity
- 3c639ef1 - WIP
- 8ca5c151 - Fix test
- fda1b2cf - WIP
- 5f342f37 - Add required_approval_count to environment entity
- c5dfc2b9 - Add tier to environment entity
- 0649e7a3 - Fix test
- 1234808e - Add deployment approval UI MVC
Toggle commit list-
871914df...ef4be671 - 760 commits from branch
removed review request for @dfosco
added 213 commits
-
1234808e...d40d831b - 212 commits from branch
master
- d81c904e - Add pending_approval_count to deployment entity
-
1234808e...d40d831b - 212 commits from branch
1 Warning This merge request is quite big (573 lines changed), please consider splitting it into multiple merge requests. 1 Message This merge request adds or changes documentation files. A review from the Technical Writing team before you merge is recommended. Reviews can happen after you merge. If needed, you can retry the
danger-review
job that generated this comment.Documentation review
The following files require a review from a technical writer:
doc/ci/environments/deployment_approvals.md
The review does not need to block merging this merge request. See the:
-
Metadata for the
*.md
files that you've changed. The first few lines of each*.md
file identify the stage and group most closely associated with your docs change. - The Technical Writer assigned for that stage and group.
- Documentation workflows for information on when to assign a merge request for review.
Reviewer roulette
Changes that require review have been detected!
Please refer to the table below for assigning reviewers and maintainers suggested by Danger in the specified category:
Category Reviewer Maintainer backend Maxime Orefice ( @morefice
) (UTC+1, 6 hours ahead of@afontaine
)Luke Duncalfe ( @.luke
) (UTC+13, 18 hours ahead of@afontaine
)frontend Coung Ngo ( @cngo
) (UTC+0, 5 hours ahead of@afontaine
)Ezekiel Kigbo ( @ekigbo
) (UTC+11, 16 hours ahead of@afontaine
)To spread load more evenly across eligible reviewers, Danger has picked a candidate for each review slot, based on their timezone. Feel free to override these selections if you think someone else would be better-suited or use the GitLab Review Workload Dashboard to find other available reviewers.
To read more on how to use the reviewer roulette, please take a look at the Engineering workflow and code review guidelines. Please consider assigning a reviewer or maintainer who is a domain expert in the area of the merge request.
Once you've decided who will review this merge request, assign them as a reviewer! Danger does not automatically notify them for you.
Generated by
Dangeradded 2019 commits
-
8cbb267c...ff84aced - 2018 commits from branch
master
- 9829cc7b - Add deployment approval UI MVC
-
8cbb267c...ff84aced - 2018 commits from branch
- A deleted user
added featureaddition typefeature labels
- Resolved by Peter Hegman
@rayana would you mind reviewing this for me? It is pretty simple at the moment
@ali-gitlab I had to add one more property to the deployment. Can you review it to make sure it looks okay?
@nicolasdular can you review the frontend please?
added UX label
requested review from @ali-gitlab, @nicolasdular, and @rayana
- Resolved by Andrew Fontaine
- Resolved by Andrew Fontaine
- Resolved by Andrew Fontaine
removed review request for @ali-gitlab
- Resolved by Rayana Verissimo
- Resolved by Peter Hegman
I cannot find this in the diff, but in the second video posted in the MR description, the error message that is displayed in the top of the page reads "The same user can not approve". Looking at the Error message guidelines, I suggest we update it to something like:
You already approved this deployment
orYou cannot review your own deployment approval requests
depending on the edge case - @rdickenson WDYT?
- Resolved by Peter Hegman
@afontaine thanks for adding the videos to the MR, this is really helpful! I'm spinning up my GDK/Gitpod, so my in depth review of the UI might take a while. Would you be able to post a video of the interface in a smaller viewport? I'm curious to see how the popover interaction adapts to ~400px wide screens.
requested review from @ali-gitlab
requested review from @rdickenson
added Technical Writing UI text labels
- Resolved by Andrew Fontaine
- Resolved by Andrew Fontaine
removed review request for @nicolasdular
@nicolasdular
, thanks for approving this merge request.This is the first time the merge request is approved. To ensure full test coverage, a new pipeline has been started.
For more info, please refer to the following links:
requested review from @shinya.maeda and removed review request for @ali-gitlab
mentioned in merge request !82454 (merged)
removed review request for @shinya.maeda
- Resolved by Peter Hegman
- Resolved by Peter Hegman
@peterhegman can you give this a frontend maintainer review?
changed milestone to %14.9
requested review from @peterhegman
Bundle size analysis [beta]
This compares changes in bundle size for entry points between the commits 76fad613 and d39dff98
Special assetsEntrypoint / Name Size before Size after Diff Diff in percent mainChunk 2.31 MB 2.3 MB -6.8 KB -0.3 % average 3.7 MB 3.69 MB -6.37 KB -0.2 % Significant Reduction: 2Expand
Entrypoint / Name Size before Size after Diff Diff in percent pages.search.show 200.42 KB 178.8 KB -21.62 KB -10.8 % pages.groups.sso 88.22 KB 80.51 KB -7.71 KB -8.7 %
Note: We do not have exact data for 76fad613. So we have used data from: 03638053.
The target commit was too new, so we used the latest commit from master we have info on.
It might help to rerun thebundle-size-review
job
This might mean that you have a few false positives in this report. If something unrelated to your code changes is reported, you can check this comparison in order to see if they caused this change.Please look at the full report for more details
Read more about how this report works.
Generated by
Dangerremoved review request for @rdickenson
removed review request for @rayana
- Resolved by Peter Hegman
- Resolved by Andrew Fontaine
- Resolved by Andrew Fontaine
- Resolved by Peter Hegman
- Resolved by Peter Hegman
- Resolved by Andrew Fontaine
removed review request for @peterhegman
- Resolved by Andrew Fontaine
- Resolved by Peter Hegman
On of my self-managed customers is very excited to see this -- glad to see the progress on this MVC. Do we think it will make it into 14.9 by the cutoff?
requested review from @peterhegman
enabled an automatic merge when the pipeline for a7780ef4 succeeds
mentioned in commit 06355b17
added workflowstaging-canary label
added workflowstaging label and removed workflowstaging-canary label
added workflowcanary label and removed workflowstaging label
added workflowproduction label and removed workflowcanary label
added releasedcandidate label
added releasedpublished label and removed releasedcandidate label
mentioned in merge request kubitus-project/kubitus-installer!797 (merged)
mentioned in commit vishwin/freebsd-ports@c617954a