Skip to content

Fix checking stable branches during patch release

Dat Tang requested to merge dattang/fix-check-security-stable-branch into master

What does this MR do and why?

Describe in detail what your merge request does and why.

Content

  • Fix checking stable branches during patch release

During a patch release, stable branches on security mirrors of GitLab components need to be checked. However, the current ComponentStatusService class can only checks canonical.

This commit adds an option for ComponentStatusService to check canonical or security mirror based on the input.

Ref: gitlab-com/gl-infra/delivery#20540 (closed)

Testing

Check Security mirror

Run command:

SLACK_TEST='true' TEST='false' LOG_LEVEL=trace bundle exec rake "security:check_component_branch_pipeline_status"

Return this log output. The information we care here is that it actually checked the security mirrors - which is what we expect.

❌ The following branches do not have green pipelines:

- gitlab-pages - 17-4-stable - failed: https://gitlab.com/gitlab-org/security/gitlab-pages/-/commits/17-4-stable

Caused by:
2024-09-27 15:02:50.248070 F ReleaseTools::Services::BranchesStatusService -- Project status check failed. If this job continues to fail, the status of the projects can be checked manually:

- cng-ee - 17-4-stable: https://gitlab.com/gitlab-org/security/charts/components/images/-/commits/17-4-stable
- cng-ee - 17-3-stable: https://gitlab.com/gitlab-org/security/charts/components/images/-/commits/17-3-stable
- cng-ee - 17-2-stable: https://gitlab.com/gitlab-org/security/charts/components/images/-/commits/17-2-stable
- gitaly - 17-4-stable: https://gitlab.com/gitlab-org/security/gitaly/-/commits/17-4-stable
- gitaly - 17-3-stable: https://gitlab.com/gitlab-org/security/gitaly/-/commits/17-3-stable
- gitaly - 17-2-stable: https://gitlab.com/gitlab-org/security/gitaly/-/commits/17-2-stable
- gitlab-ee - 17-4-stable-ee: https://gitlab.com/gitlab-org/security/gitlab/-/commits/17-4-stable-ee
- gitlab-ee - 17-3-stable-ee: https://gitlab.com/gitlab-org/security/gitlab/-/commits/17-3-stable-ee
- gitlab-ee - 17-2-stable-ee: https://gitlab.com/gitlab-org/security/gitlab/-/commits/17-2-stable-ee
- gitlab-pages - 17-4-stable: https://gitlab.com/gitlab-org/security/gitlab-pages/-/commits/17-4-stable
- gitlab-pages - 17-3-stable: https://gitlab.com/gitlab-org/security/gitlab-pages/-/commits/17-3-stable
- gitlab-pages - 17-2-stable: https://gitlab.com/gitlab-org/security/gitlab-pages/-/commits/17-2-stable
- omnibus-gitlab-ee - 17-4-stable: https://gitlab.com/gitlab-org/security/omnibus-gitlab/-/commits/17-4-stable
- omnibus-gitlab-ee - 17-3-stable: https://gitlab.com/gitlab-org/security/omnibus-gitlab/-/commits/17-3-stable
- omnibus-gitlab-ee - 17-2-stable: https://gitlab.com/gitlab-org/security/omnibus-gitlab/-/commits/17-2-stable
- gitlab-ce - 17-4-stable: https://gitlab.com/gitlab-org/security/gitlab-foss/-/commits/17-4-stable
- gitlab-ce - 17-3-stable: https://gitlab.com/gitlab-org/security/gitlab-foss/-/commits/17-3-stable
- gitlab-ce - 17-2-stable: https://gitlab.com/gitlab-org/security/gitlab-foss/-/commits/17-2-stable

Check canonical mirror

Run command:

SLACK_TEST='true' TEST='false' LOG_LEVEL=trace bundle exec rake "monthly:tag_day:ensure_stable_branches_green"

Return this log output. The information we care here is that it actually checked the canonical mirrors - which is what we expect.

❌ The following branches do not have green pipelines:

- cng-ee - 17-5-stable - : https://gitlab.com/gitlab-org/build/CNG/-/commits/17-5-stable
- gitaly - 17-5-stable - : https://gitlab.com/gitlab-org/gitaly/-/commits/17-5-stable
- gitlab-ee - 17-5-stable-ee - : https://gitlab.com/gitlab-org/gitlab/-/commits/17-5-stable-ee
- gitlab-pages - 17-5-stable - : https://gitlab.com/gitlab-org/gitlab-pages/-/commits/17-5-stable
- omnibus-gitlab-ee - 17-5-stable - : https://gitlab.com/gitlab-org/omnibus-gitlab/-/commits/17-5-stable
- gitlab-ce - 17-5-stable - : https://gitlab.com/gitlab-org/gitlab-foss/-/commits/17-5-stable
Edited by Dat Tang

Merge request reports

Loading