Skip to content

Commit 85e0151

Browse files
authored
Use consistent commit for update-otel (#40462)
<!--Ex. Fixing a bug - Describe the bug and how this fixes the issue. Ex. Adding a feature - Explain what this achieves.--> #### Description Right now we use 'main' as the commit when updating: https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/0087046281afca6f7607703841fd8cecbc778dae/Makefile#L5-L6 This is troublesome if there are pushes to main while the update-otel is running, or just in general since we go via the Go proxy and sometimes the latest commit has not been chached. This changes things so that we use a fixed commit from the checkout.
1 parent 07a9611 commit 85e0151

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

.github/workflows/update-otel.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,14 @@ jobs:
2020
- name: Update to latest opentelemetry-collector release and create a PR
2121
run: |
2222
exec > >(tee log.out) 2>&1
23+
LAST_COMMIT=$(git -C ./opentelemetry-collector/ rev-parse HEAD)
2324
cd opentelemetry-collector-contrib
2425
git config user.name opentelemetrybot
2526
git config user.email [email protected]
2627
branch="opentelemetrybot/update-otel-$(date +%s)"
2728
git checkout -b $branch
2829
make genotelcontribcol
29-
make update-otel
30+
make update-otel OTEL_STABLE_VERSION=${LAST_COMMIT} OTEL_VERSION=${LAST_COMMIT}
3031
git push --set-upstream origin $branch
3132
gh pr create --base main --title "[chore] Update core dependencies" --body "This PR updates the opentelemetry-collector dependency to the latest release"
3233
env:

0 commit comments

Comments
 (0)