Skip to content

Commit 0776b11

Browse files
authored
Merge branch 'main' into codeboten/rm-semconv
2 parents 6be942a + ba3d734 commit 0776b11

File tree

331 files changed

+9060
-5698
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

331 files changed

+9060
-5698
lines changed

.chloggen/add-resource-scope.yaml

Lines changed: 0 additions & 25 deletions
This file was deleted.

.chloggen/codeboten_mark-semconv-deprecated.yaml

Lines changed: 0 additions & 25 deletions
This file was deleted.

.chloggen/context-in-sinks.yaml

Lines changed: 0 additions & 25 deletions
This file was deleted.

.chloggen/mdatagen-events-doc.yaml

Lines changed: 0 additions & 25 deletions
This file was deleted.

.chloggen/mx-psi_decodenil.yaml renamed to .chloggen/mx-psi_configoptional-to-none-unmarshal.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@
44
change_type: enhancement
55

66
# The name of the component, or a single word describing the area of concern, (e.g. otlpreceiver)
7-
component: confmap
7+
component: configoptional
88

99
# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`).
10-
note: Support running Unmarshal hooks on nil values.
10+
note: "Make unmarshaling into `None[T]` work the same as unmarshaling into `(*T)(nil)`."
1111

1212
# One or more tracking issues or pull requests related to the change
13-
issues: [12981]
13+
issues: [13168]
1414

1515
# (Optional) One or more lines of additional information to render under the primary note.
1616
# These lines will be padded with 2 spaces and then inserted directly into the document.

.chloggen/mx-psi_sanitizedurlpath.yaml renamed to .chloggen/mx-psi_newdefault-nopointer.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@
44
change_type: breaking
55

66
# The name of the component, or a single word describing the area of concern, (e.g. otlpreceiver)
7-
component: otlpreceiver
7+
component: configgrpc,confighttp
88

99
# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`).
10-
note: Use wrapper type for URL paths
10+
note: Unify return type of `NewDefault*Config` functions to return a struct instead of a pointer.
1111

1212
# One or more tracking issues or pull requests related to the change
13-
issues: [13046]
13+
issues: [13169]
1414

1515
# (Optional) One or more lines of additional information to render under the primary note.
1616
# These lines will be padded with 2 spaces and then inserted directly into the document.

.chloggen/pipeline-throughput.yaml

Lines changed: 0 additions & 32 deletions
This file was deleted.
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: Automation - Release Branch
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
release-series:
7+
description: 'Release series (e.g., v0.85.x).'
8+
required: true
9+
prepare-release-commit-hash:
10+
description: 'Commit hash for "Prepare release" commit (e.g., a1b2c3d4)'
11+
required: true
12+
13+
jobs:
14+
release-branch:
15+
runs-on: ubuntu-latest
16+
permissions:
17+
contents: write
18+
steps:
19+
- name: Checkout repository
20+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
21+
with:
22+
fetch-depth: 0
23+
24+
- name: Setup Go
25+
uses: actions/setup-go@f111f3307d8850f501ac008e886eec1fd1932a34 # v5.3.0
26+
with:
27+
go-version: 1.23.9
28+
29+
- name: Setup Git config
30+
run: |
31+
git config --global user.name "opentelemetrybot"
32+
git config --global user.email "[email protected]"
33+
34+
- name: Run release-branch.sh
35+
run: |
36+
./.github/workflows/scripts/release-branch.sh "${{ inputs.release-series }}" "${{ inputs.prepare-release-commit-hash }}"
37+
env:
38+
UPSTREAM_REMOTE_NAME: "origin"
39+
MAIN_BRANCH_NAME: "main"
Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
#!/bin/bash -ex
2+
#
3+
# Copyright The OpenTelemetry Authors
4+
# SPDX-License-Identifier: Apache-2.0
5+
6+
# --- Configuration ---
7+
RELEASE_SERIES="$1" # e.g., v0.85.x
8+
PREPARE_RELEASE_COMMIT_HASH="$2" # Optional: Specific commit hash for "Prepare release"
9+
UPSTREAM_REMOTE_NAME=${UPSTREAM_REMOTE_NAME:-"upstream"} # Your upstream remote name for open-telemetry/opentelemetry-collector
10+
MAIN_BRANCH_NAME=${MAIN_BRANCH_NAME:-"main"}
11+
LOCAL_MAIN_BRANCH_NAME=${LOCAL_MAIN_BRANCH_NAME:-"${MAIN_BRANCH_NAME}"}
12+
# These variables are only used if git user.name and git user.email are not configured
13+
GIT_CONFIG_USER_NAME=${GIT_CONFIG_USER_NAME:-"opentelemetrybot"}
14+
GIT_CONFIG_USER_EMAIL=${GIT_CONFIG_USER_EMAIL:-"[email protected]"}
15+
16+
# --- Validate Input ---
17+
if [[ -z "$RELEASE_SERIES" || -z "$PREPARE_RELEASE_COMMIT_HASH" ]]; then
18+
echo "Error: Both release series and prepare release commit hash must be provided."
19+
echo "Usage: $0 <release-series> <prepare-release-commit-hash>"
20+
echo "Example: $0 v0.85.x a1b2c3d4"
21+
exit 1
22+
fi
23+
24+
RELEASE_BRANCH_NAME="release/${RELEASE_SERIES}"
25+
26+
echo "Automating Release Steps for: ${RELEASE_SERIES}"
27+
echo "Release Branch Name: ${RELEASE_BRANCH_NAME}"
28+
echo "'Prepare release' commit hash: ${PREPARE_RELEASE_COMMIT_HASH}"
29+
echo "Upstream Remote: ${UPSTREAM_REMOTE_NAME}"
30+
echo "--------------------------------------------------"
31+
32+
# --- Step 4: Checkout main, Pull, Create/Update and Push Release Branch ---
33+
echo ""
34+
echo "=== Step 4: Preparing and Pushing Release Branch ==="
35+
36+
# 1. Checkout main
37+
git checkout "${LOCAL_MAIN_BRANCH_NAME}"
38+
39+
# 2. Fetch from upstream (updates remote-tracking branches including potential existing release branch)
40+
git fetch "${UPSTREAM_REMOTE_NAME}"
41+
42+
# 3. Rebase local main with upstream/main
43+
git rebase "${UPSTREAM_REMOTE_NAME}/${MAIN_BRANCH_NAME}"
44+
echo "'${LOCAL_MAIN_BRANCH_NAME}' branch is now up-to-date."
45+
46+
# Verify the commit exists (it should be reachable from main after fetch)
47+
if ! git cat-file -e "${PREPARE_RELEASE_COMMIT_HASH}^{commit}" 2>/dev/null; then
48+
echo "Error: Provided 'Prepare release' commit hash '${PREPARE_RELEASE_COMMIT_HASH}' not found."
49+
exit 1
50+
fi
51+
# 4. Handle Release Branch: Check existence, create or switch, and merge/base
52+
BRANCH_EXISTS_LOCALLY=$(git branch --list "${RELEASE_BRANCH_NAME}")
53+
# Check remote by looking for the remote tracking branch ref after fetch
54+
if git rev-parse --verify --quiet "${UPSTREAM_REMOTE_NAME}/${RELEASE_BRANCH_NAME}" > /dev/null 2>&1; then
55+
BRANCH_EXISTS_REMOTELY=true
56+
fi
57+
58+
if [[ -n "$BRANCH_EXISTS_LOCALLY" ]]; then
59+
echo "Release branch '${RELEASE_BRANCH_NAME}' found locally."
60+
echo "Please delete local release branch using 'git branch -D ${RELEASE_BRANCH_NAME}' and run the script again."
61+
exit 1
62+
elif [[ -n "$BRANCH_EXISTS_REMOTELY" ]]; then
63+
echo "Release branch '${RELEASE_BRANCH_NAME}' found on remote '${UPSTREAM_REMOTE_NAME}'."
64+
echo "Nothing to do, exiting."
65+
exit 0
66+
else
67+
echo "Release branch '${RELEASE_BRANCH_NAME}' not found locally or on remote."
68+
git switch -c "${RELEASE_BRANCH_NAME}" "${PREPARE_RELEASE_COMMIT_HASH}"
69+
fi
70+
71+
echo "Current branch is now '${RELEASE_BRANCH_NAME}'."
72+
git --no-pager log -1 --pretty=oneline # Show the commit at the tip of the release branch
73+
74+
# 5. Push the release branch to upstream
75+
git push -u "${UPSTREAM_REMOTE_NAME}" "${RELEASE_BRANCH_NAME}"
76+
echo "Branch '${RELEASE_BRANCH_NAME}' pushed (or updated) on '${UPSTREAM_REMOTE_NAME}'."
77+
echo "Step 4 completed."
78+
echo "--------------------------------------------------"
79+
80+
echo ""
81+
echo "Automation for your Step 4 (push release/<release-series> branch) complete."
82+
echo "Next, you would typically proceed to your Step 5 on your local machine."
83+
echo "You will need to check out the release branch locally and push beta/stable tags."

0 commit comments

Comments
 (0)