summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2023-03-17 18:56:41 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2023-03-17 18:56:41 +0000
commitf9d5906a7d19306ee45d09f1dfb400007e5f1be2 (patch)
treec0cb7bf66c8ff0fcb3685b10c6c479c51e092bbd
parent236fa4fa7e4986bbb5fa54ef82975a6846e3a1d6 (diff)
downloadgitlab-ce-f9d5906a7d19306ee45d09f1dfb400007e5f1be2.tar.gz
Add latest changes from gitlab-org/gitlab@15-9-stable-ee
-rw-r--r--.gitlab/merge_request_templates/Stable Branch.md15
-rw-r--r--spec/tooling/danger/stable_branch_spec.rb21
-rw-r--r--tooling/danger/stable_branch.rb2
3 files changed, 34 insertions, 4 deletions
diff --git a/.gitlab/merge_request_templates/Stable Branch.md b/.gitlab/merge_request_templates/Stable Branch.md
index 9f1408e06bc..2196af1a214 100644
--- a/.gitlab/merge_request_templates/Stable Branch.md
+++ b/.gitlab/merge_request_templates/Stable Branch.md
@@ -4,7 +4,7 @@ GitLab patch releases https://docs.gitlab.com/ee/policy/maintenance.html#patch-r
If you're backporting a security fix, please refer to the security merge request
template https://gitlab.com/gitlab-org/security/gitlab/blob/master/.gitlab/merge_request_templates/Security%20Release.md.
-Security backport merge requests should not be opened on this project.
+Security backport merge requests should not be opened on the GitLab canonical project.
-->
## What does this MR do and why?
@@ -17,6 +17,19 @@ This checklist encourages us to confirm any changes have been analyzed to reduce
* [ ] This MR is backporting a bug fix, documentation update, or spec fix, previously merged in the default branch.
* [ ] The original MR has been deployed to GitLab.com (not applicable for documentation or spec changes).
+* [ ] This MR has a [severity label] assigned (if applicable).
* [ ] Ensure the `e2e:package-and-test` job has either succeeded or been approved by a Software Engineer in Test.
+#### Note to the merge request author and maintainer
+
+The process of backporting bug fixes into stable branches is tracked as part of an
+[internal pilot]. If you have questions about this process, please:
+
+* Refer to the [internal pilot] issue for feedback or questions.
+* Refer to the [patch release runbook for engineers and maintainers] for guidance.
+
+[severity label]: https://about.gitlab.com/handbook/engineering/quality/issue-triage/#severity
+[internal pilot]: https://gitlab.com/gitlab-com/gl-infra/delivery/-/issues/2886
+[patch release runbook for engineers and maintainers]: https://gitlab.com/gitlab-org/release/docs/-/blob/master/general/patch/process_new.md
+
/assign me
diff --git a/spec/tooling/danger/stable_branch_spec.rb b/spec/tooling/danger/stable_branch_spec.rb
index 6b5c0b8cf27..4d86e066c20 100644
--- a/spec/tooling/danger/stable_branch_spec.rb
+++ b/spec/tooling/danger/stable_branch_spec.rb
@@ -177,20 +177,37 @@ RSpec.describe Tooling::Danger::StableBranch, feature_category: :delivery do
it_behaves_like 'bypassing when flaky test or docs only'
end
- context 'when no package-and-test job is found' do
+ context 'when no package-and-test bridge is found' do
let(:pipeline_bridges_response) { nil }
it_behaves_like 'with a failure', described_class::NEEDS_PACKAGE_AND_TEST_MESSAGE
it_behaves_like 'bypassing when flaky test or docs only'
end
- context 'when package-and-test job is being created' do
+ context 'when package-and-test bridge is created' do
let(:pipeline_bridge_state) { 'created' }
it_behaves_like 'with a warning', described_class::WARN_PACKAGE_AND_TEST_MESSAGE
it_behaves_like 'bypassing when flaky test or docs only'
end
+ context 'when package-and-test bridge has been canceled and no downstream pipeline is generated' do
+ let(:pipeline_bridge_state) { 'canceled' }
+
+ let(:pipeline_bridges_response) do
+ [
+ {
+ 'name' => 'e2e:package-and-test',
+ 'status' => pipeline_bridge_state,
+ 'downstream_pipeline' => nil
+ }
+ ]
+ end
+
+ it_behaves_like 'with a failure', described_class::NEEDS_PACKAGE_AND_TEST_MESSAGE
+ it_behaves_like 'bypassing when flaky test or docs only'
+ end
+
context 'when package-and-test job is in a non-successful state' do
let(:package_and_qa_state) { 'running' }
diff --git a/tooling/danger/stable_branch.rb b/tooling/danger/stable_branch.rb
index 65086c8485c..9b467146096 100644
--- a/tooling/danger/stable_branch.rb
+++ b/tooling/danger/stable_branch.rb
@@ -102,7 +102,7 @@ module Tooling
if bridge['status'] == 'created'
bridge['status']
else
- bridge.fetch('downstream_pipeline').fetch('status')
+ bridge.fetch('downstream_pipeline')&.fetch('status')
end
end