Skip to content

Commit 73e7c97

Browse files
authored
Implement a merge freeze when an "[chore] Update core dependencies" PR on opentelemetry-collector-contrib is present (#12837)
#### Description Extend the merge freeze logic in `.github/workflows/scripts/check-merge-freeze.sh` to include open PRs titled "[chore] Update core dependencies" in the `opentelemetry-collector-contrib](https://github.com/open-telemetry/opentelemetry-collector-contrib` repository, in addition to the existing check for "[chore] Prepare release" PRs in the core repo. This ensures that no PRs can be merged into `main` while a core update PR is pending in contrib, helping us avoid version drift and keep dependencies aligned between core and contrib. <!-- Issue number if applicable --> #### Link to tracking issue Fixes #12830 <!--Describe what testing was performed and which tests were added.--> #### Testing Tested locally by: - Opening a dummy "[chore] Update core dependencies" PR on `opentelemetry-collector-contrib` - Running the updated `check-merge-freeze.sh` script to confirm it correctly blocks merges - Verified output message includes the contrib PR URL when such a PR is open <!--Describe the documentation added.--> #### Documentation No user-facing documentation changes needed. This change only affects internal CI logic. <!--Please delete paragraphs that you did not use before submitting.--> Signed-off-by: sAchin-680 <[email protected]>
1 parent 727ae96 commit 73e7c97

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

.github/workflows/scripts/check-merge-freeze.sh

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,18 @@
33
# Copyright The OpenTelemetry Authors
44
# SPDX-License-Identifier: Apache-2.0
55

6+
# Check for [chore] Prepare release PRs in core repo
67
BLOCKERS=$( gh pr list -A opentelemetrybot -S "[chore] Prepare release" --json url -q '.[].url' -R "${REPO}" )
8+
9+
# Check for [chore] Update core dependencies PRs in opentelemetry-collector-contrib
10+
CONTRIB_REPO="open-telemetry/opentelemetry-collector-contrib"
11+
CONTRIB_BLOCKERS=$( gh pr list -A opentelemetrybot -S "[chore] Update core dependencies" --json url -q '.[].url' -R "${CONTRIB_REPO}" )
12+
13+
# Combine both blockers
14+
BLOCKERS="${BLOCKERS}${BLOCKERS:+ }${CONTRIB_BLOCKERS}"
15+
716
if [ "${BLOCKERS}" != "" ]; then
8-
echo "Merging in main is frozen, as there are open \"Prepare release\" PRs: ${BLOCKERS}"
17+
echo "Merging in main is frozen, as there are open release/update PRs: ${BLOCKERS}"
918
echo "If you believe this is no longer true, re-run this job to unblock your PR."
1019
exit 1
1120
fi

0 commit comments

Comments
 (0)