Add latest changes from gitlab-org/gitlab@15-9-stable-ee

This commit is contained in:
GitLab Bot 2023-03-17 18:56:41 +00:00
parent 236fa4fa7e
commit f9d5906a7d
3 changed files with 34 additions and 4 deletions

View File

@ -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

View File

@ -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' }

View File

@ -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