From aa4c4027a3c44f7168d36e2fa77f43da8846d9c5 Mon Sep 17 00:00:00 2001 From: Trask Stalnaker Date: Wed, 27 Apr 2022 16:38:17 -0700 Subject: [PATCH 01/51] Update to "-dev" versions on main --- eachdist.ini | 4 ++-- .../src/opentelemetry/exporter/jaeger/proto/grpc/version.py | 2 +- .../src/opentelemetry/exporter/jaeger/thrift/version.py | 2 +- .../src/opentelemetry/exporter/jaeger/version.py | 2 +- .../src/opentelemetry/exporter/opencensus/version.py | 2 +- .../src/opentelemetry/exporter/otlp/proto/grpc/version.py | 2 +- .../src/opentelemetry/exporter/otlp/proto/http/version.py | 2 +- .../src/opentelemetry/exporter/otlp/version.py | 2 +- .../src/opentelemetry/exporter/prometheus/version.py | 2 +- .../src/opentelemetry/exporter/zipkin/json/version.py | 2 +- .../src/opentelemetry/exporter/zipkin/proto/http/version.py | 2 +- .../src/opentelemetry/exporter/zipkin/version.py | 2 +- opentelemetry-api/src/opentelemetry/version.py | 2 +- opentelemetry-proto/src/opentelemetry/proto/version.py | 2 +- opentelemetry-sdk/src/opentelemetry/sdk/version.py | 2 +- .../src/opentelemetry/semconv/version.py | 2 +- .../src/opentelemetry/propagators/b3/version.py | 2 +- .../src/opentelemetry/propagators/jaeger/version.py | 2 +- .../src/opentelemetry/shim/opentracing_shim/version.py | 2 +- .../src/opentelemetry/test/version.py | 2 +- 20 files changed, 21 insertions(+), 21 deletions(-) diff --git a/eachdist.ini b/eachdist.ini index 7cc26cc2ca1..b6b3b24fcd7 100644 --- a/eachdist.ini +++ b/eachdist.ini @@ -11,7 +11,7 @@ sortfirst= exporter/* [stable] -version=1.13.0 +version=1.14.0-dev packages= opentelemetry-sdk @@ -30,7 +30,7 @@ packages= opentelemetry-api [prerelease] -version=0.34b0 +version=0.35b0-dev packages= opentelemetry-opentracing-shim diff --git a/exporter/opentelemetry-exporter-jaeger-proto-grpc/src/opentelemetry/exporter/jaeger/proto/grpc/version.py b/exporter/opentelemetry-exporter-jaeger-proto-grpc/src/opentelemetry/exporter/jaeger/proto/grpc/version.py index b65ab4af2bb..16f468f525c 100644 --- a/exporter/opentelemetry-exporter-jaeger-proto-grpc/src/opentelemetry/exporter/jaeger/proto/grpc/version.py +++ b/exporter/opentelemetry-exporter-jaeger-proto-grpc/src/opentelemetry/exporter/jaeger/proto/grpc/version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. -__version__ = "1.13.0" +__version__ = "1.14.0-dev" diff --git a/exporter/opentelemetry-exporter-jaeger-thrift/src/opentelemetry/exporter/jaeger/thrift/version.py b/exporter/opentelemetry-exporter-jaeger-thrift/src/opentelemetry/exporter/jaeger/thrift/version.py index b65ab4af2bb..16f468f525c 100644 --- a/exporter/opentelemetry-exporter-jaeger-thrift/src/opentelemetry/exporter/jaeger/thrift/version.py +++ b/exporter/opentelemetry-exporter-jaeger-thrift/src/opentelemetry/exporter/jaeger/thrift/version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. -__version__ = "1.13.0" +__version__ = "1.14.0-dev" diff --git a/exporter/opentelemetry-exporter-jaeger/src/opentelemetry/exporter/jaeger/version.py b/exporter/opentelemetry-exporter-jaeger/src/opentelemetry/exporter/jaeger/version.py index b65ab4af2bb..16f468f525c 100644 --- a/exporter/opentelemetry-exporter-jaeger/src/opentelemetry/exporter/jaeger/version.py +++ b/exporter/opentelemetry-exporter-jaeger/src/opentelemetry/exporter/jaeger/version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. -__version__ = "1.13.0" +__version__ = "1.14.0-dev" diff --git a/exporter/opentelemetry-exporter-opencensus/src/opentelemetry/exporter/opencensus/version.py b/exporter/opentelemetry-exporter-opencensus/src/opentelemetry/exporter/opencensus/version.py index 09b3473b7d4..eece17ed3dc 100644 --- a/exporter/opentelemetry-exporter-opencensus/src/opentelemetry/exporter/opencensus/version.py +++ b/exporter/opentelemetry-exporter-opencensus/src/opentelemetry/exporter/opencensus/version.py @@ -12,4 +12,4 @@ # See the License for the specific language governing permissions and # limitations under the License. -__version__ = "0.34b0" +__version__ = "0.35b0-dev" diff --git a/exporter/opentelemetry-exporter-otlp-proto-grpc/src/opentelemetry/exporter/otlp/proto/grpc/version.py b/exporter/opentelemetry-exporter-otlp-proto-grpc/src/opentelemetry/exporter/otlp/proto/grpc/version.py index b9536c24614..bfd387c0b5b 100644 --- a/exporter/opentelemetry-exporter-otlp-proto-grpc/src/opentelemetry/exporter/otlp/proto/grpc/version.py +++ b/exporter/opentelemetry-exporter-otlp-proto-grpc/src/opentelemetry/exporter/otlp/proto/grpc/version.py @@ -12,4 +12,4 @@ # See the License for the specific language governing permissions and # limitations under the License. -__version__ = "1.13.0" +__version__ = "1.14.0-dev" diff --git a/exporter/opentelemetry-exporter-otlp-proto-http/src/opentelemetry/exporter/otlp/proto/http/version.py b/exporter/opentelemetry-exporter-otlp-proto-http/src/opentelemetry/exporter/otlp/proto/http/version.py index b9536c24614..bfd387c0b5b 100644 --- a/exporter/opentelemetry-exporter-otlp-proto-http/src/opentelemetry/exporter/otlp/proto/http/version.py +++ b/exporter/opentelemetry-exporter-otlp-proto-http/src/opentelemetry/exporter/otlp/proto/http/version.py @@ -12,4 +12,4 @@ # See the License for the specific language governing permissions and # limitations under the License. -__version__ = "1.13.0" +__version__ = "1.14.0-dev" diff --git a/exporter/opentelemetry-exporter-otlp/src/opentelemetry/exporter/otlp/version.py b/exporter/opentelemetry-exporter-otlp/src/opentelemetry/exporter/otlp/version.py index b9536c24614..bfd387c0b5b 100644 --- a/exporter/opentelemetry-exporter-otlp/src/opentelemetry/exporter/otlp/version.py +++ b/exporter/opentelemetry-exporter-otlp/src/opentelemetry/exporter/otlp/version.py @@ -12,4 +12,4 @@ # See the License for the specific language governing permissions and # limitations under the License. -__version__ = "1.13.0" +__version__ = "1.14.0-dev" diff --git a/exporter/opentelemetry-exporter-prometheus/src/opentelemetry/exporter/prometheus/version.py b/exporter/opentelemetry-exporter-prometheus/src/opentelemetry/exporter/prometheus/version.py index 09b3473b7d4..eece17ed3dc 100644 --- a/exporter/opentelemetry-exporter-prometheus/src/opentelemetry/exporter/prometheus/version.py +++ b/exporter/opentelemetry-exporter-prometheus/src/opentelemetry/exporter/prometheus/version.py @@ -12,4 +12,4 @@ # See the License for the specific language governing permissions and # limitations under the License. -__version__ = "0.34b0" +__version__ = "0.35b0-dev" diff --git a/exporter/opentelemetry-exporter-zipkin-json/src/opentelemetry/exporter/zipkin/json/version.py b/exporter/opentelemetry-exporter-zipkin-json/src/opentelemetry/exporter/zipkin/json/version.py index b9536c24614..bfd387c0b5b 100644 --- a/exporter/opentelemetry-exporter-zipkin-json/src/opentelemetry/exporter/zipkin/json/version.py +++ b/exporter/opentelemetry-exporter-zipkin-json/src/opentelemetry/exporter/zipkin/json/version.py @@ -12,4 +12,4 @@ # See the License for the specific language governing permissions and # limitations under the License. -__version__ = "1.13.0" +__version__ = "1.14.0-dev" diff --git a/exporter/opentelemetry-exporter-zipkin-proto-http/src/opentelemetry/exporter/zipkin/proto/http/version.py b/exporter/opentelemetry-exporter-zipkin-proto-http/src/opentelemetry/exporter/zipkin/proto/http/version.py index b9536c24614..bfd387c0b5b 100644 --- a/exporter/opentelemetry-exporter-zipkin-proto-http/src/opentelemetry/exporter/zipkin/proto/http/version.py +++ b/exporter/opentelemetry-exporter-zipkin-proto-http/src/opentelemetry/exporter/zipkin/proto/http/version.py @@ -12,4 +12,4 @@ # See the License for the specific language governing permissions and # limitations under the License. -__version__ = "1.13.0" +__version__ = "1.14.0-dev" diff --git a/exporter/opentelemetry-exporter-zipkin/src/opentelemetry/exporter/zipkin/version.py b/exporter/opentelemetry-exporter-zipkin/src/opentelemetry/exporter/zipkin/version.py index b9536c24614..bfd387c0b5b 100644 --- a/exporter/opentelemetry-exporter-zipkin/src/opentelemetry/exporter/zipkin/version.py +++ b/exporter/opentelemetry-exporter-zipkin/src/opentelemetry/exporter/zipkin/version.py @@ -12,4 +12,4 @@ # See the License for the specific language governing permissions and # limitations under the License. -__version__ = "1.13.0" +__version__ = "1.14.0-dev" diff --git a/opentelemetry-api/src/opentelemetry/version.py b/opentelemetry-api/src/opentelemetry/version.py index b9536c24614..bfd387c0b5b 100644 --- a/opentelemetry-api/src/opentelemetry/version.py +++ b/opentelemetry-api/src/opentelemetry/version.py @@ -12,4 +12,4 @@ # See the License for the specific language governing permissions and # limitations under the License. -__version__ = "1.13.0" +__version__ = "1.14.0-dev" diff --git a/opentelemetry-proto/src/opentelemetry/proto/version.py b/opentelemetry-proto/src/opentelemetry/proto/version.py index b9536c24614..bfd387c0b5b 100644 --- a/opentelemetry-proto/src/opentelemetry/proto/version.py +++ b/opentelemetry-proto/src/opentelemetry/proto/version.py @@ -12,4 +12,4 @@ # See the License for the specific language governing permissions and # limitations under the License. -__version__ = "1.13.0" +__version__ = "1.14.0-dev" diff --git a/opentelemetry-sdk/src/opentelemetry/sdk/version.py b/opentelemetry-sdk/src/opentelemetry/sdk/version.py index b9536c24614..bfd387c0b5b 100644 --- a/opentelemetry-sdk/src/opentelemetry/sdk/version.py +++ b/opentelemetry-sdk/src/opentelemetry/sdk/version.py @@ -12,4 +12,4 @@ # See the License for the specific language governing permissions and # limitations under the License. -__version__ = "1.13.0" +__version__ = "1.14.0-dev" diff --git a/opentelemetry-semantic-conventions/src/opentelemetry/semconv/version.py b/opentelemetry-semantic-conventions/src/opentelemetry/semconv/version.py index 09b3473b7d4..eece17ed3dc 100644 --- a/opentelemetry-semantic-conventions/src/opentelemetry/semconv/version.py +++ b/opentelemetry-semantic-conventions/src/opentelemetry/semconv/version.py @@ -12,4 +12,4 @@ # See the License for the specific language governing permissions and # limitations under the License. -__version__ = "0.34b0" +__version__ = "0.35b0-dev" diff --git a/propagator/opentelemetry-propagator-b3/src/opentelemetry/propagators/b3/version.py b/propagator/opentelemetry-propagator-b3/src/opentelemetry/propagators/b3/version.py index b9536c24614..bfd387c0b5b 100644 --- a/propagator/opentelemetry-propagator-b3/src/opentelemetry/propagators/b3/version.py +++ b/propagator/opentelemetry-propagator-b3/src/opentelemetry/propagators/b3/version.py @@ -12,4 +12,4 @@ # See the License for the specific language governing permissions and # limitations under the License. -__version__ = "1.13.0" +__version__ = "1.14.0-dev" diff --git a/propagator/opentelemetry-propagator-jaeger/src/opentelemetry/propagators/jaeger/version.py b/propagator/opentelemetry-propagator-jaeger/src/opentelemetry/propagators/jaeger/version.py index b9536c24614..bfd387c0b5b 100644 --- a/propagator/opentelemetry-propagator-jaeger/src/opentelemetry/propagators/jaeger/version.py +++ b/propagator/opentelemetry-propagator-jaeger/src/opentelemetry/propagators/jaeger/version.py @@ -12,4 +12,4 @@ # See the License for the specific language governing permissions and # limitations under the License. -__version__ = "1.13.0" +__version__ = "1.14.0-dev" diff --git a/shim/opentelemetry-opentracing-shim/src/opentelemetry/shim/opentracing_shim/version.py b/shim/opentelemetry-opentracing-shim/src/opentelemetry/shim/opentracing_shim/version.py index 09b3473b7d4..eece17ed3dc 100644 --- a/shim/opentelemetry-opentracing-shim/src/opentelemetry/shim/opentracing_shim/version.py +++ b/shim/opentelemetry-opentracing-shim/src/opentelemetry/shim/opentracing_shim/version.py @@ -12,4 +12,4 @@ # See the License for the specific language governing permissions and # limitations under the License. -__version__ = "0.34b0" +__version__ = "0.35b0-dev" diff --git a/tests/opentelemetry-test-utils/src/opentelemetry/test/version.py b/tests/opentelemetry-test-utils/src/opentelemetry/test/version.py index a590883f7e0..4bd765ab933 100644 --- a/tests/opentelemetry-test-utils/src/opentelemetry/test/version.py +++ b/tests/opentelemetry-test-utils/src/opentelemetry/test/version.py @@ -1 +1 @@ -__version__ = "0.34b0" +__version__ = "0.35b0-dev" From dd8b7c010a46ed38f4ec959dae631b081b602038 Mon Sep 17 00:00:00 2001 From: Trask Stalnaker Date: Wed, 27 Apr 2022 15:03:45 -0700 Subject: [PATCH 02/51] Add prepare-release-branch workflow --- .github/scripts/set-git-user.sh | 5 + .github/scripts/update-version.sh | 6 ++ .github/workflows/backport.yml | 38 +++++++ .github/workflows/changelog.yml | 5 +- .../workflows/merge-change-log-to-main.yml | 36 +++++++ .github/workflows/prepare-patch-release.yml | 53 ++++++++++ .github/workflows/prepare-release-branch.yml | 100 ++++++++++++++++++ .github/workflows/release.yml | 99 +++++++++++++++++ scripts/eachdist.py | 52 --------- 9 files changed, 341 insertions(+), 53 deletions(-) create mode 100755 .github/scripts/set-git-user.sh create mode 100755 .github/scripts/update-version.sh create mode 100644 .github/workflows/backport.yml create mode 100644 .github/workflows/merge-change-log-to-main.yml create mode 100644 .github/workflows/prepare-patch-release.yml create mode 100644 .github/workflows/prepare-release-branch.yml create mode 100644 .github/workflows/release.yml diff --git a/.github/scripts/set-git-user.sh b/.github/scripts/set-git-user.sh new file mode 100755 index 00000000000..c5d5b328ef5 --- /dev/null +++ b/.github/scripts/set-git-user.sh @@ -0,0 +1,5 @@ +#!/bin/bash -e + +# TODO update with opentelemetry-python-bot or a shared otel bot +git config user.name opentelemetry-java-bot +git config user.email 97938252+opentelemetry-java-bot@users.noreply.github.com diff --git a/.github/scripts/update-version.sh b/.github/scripts/update-version.sh new file mode 100755 index 00000000000..ba1bd22955b --- /dev/null +++ b/.github/scripts/update-version.sh @@ -0,0 +1,6 @@ +#!/bin/bash -e + +sed -i "/\[stable\]/{n;s/version=.*/version=$1/}" eachdist.ini +sed -i "/\[prerelease\]/{n;s/version=.*/version=$2/}" eachdist.ini + +./scripts/eachdist.py update_versions --versions stable,prerelease diff --git a/.github/workflows/backport.yml b/.github/workflows/backport.yml new file mode 100644 index 00000000000..0eb503f5248 --- /dev/null +++ b/.github/workflows/backport.yml @@ -0,0 +1,38 @@ +name: Backport +on: + workflow_dispatch: + inputs: + number: + description: "The pull request # to backport" + required: true + +jobs: + backport: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + with: + # history is needed to run git cherry-pick below + fetch-depth: 0 + + - name: Set git user + run: .github/scripts/set-git-user.sh + + - name: Create pull request + env: + NUMBER: ${{ github.event.inputs.number }} + # not using the default GITHUB_TOKEN because pull requests generated by it do not run any workflows + GITHUB_TOKEN: ${{ secrets.BOT_TOKEN }} + run: | + commit=$(gh pr view $NUMBER --json mergeCommit --jq .mergeCommit.oid) + title=$(gh pr view $NUMBER --json title --jq .title) + url=$(gh pr view $NUMBER --json url --jq .url) + + branch="backport-$NUMBER-to-${GITHUB_REF_NAME//\//-}" + + git cherry-pick $commit + git push origin HEAD:$branch + gh pr create --title "[$GITHUB_REF_NAME] $title" \ + --body "Clean cherry-pick of #$NUMBER to the \`$GITHUB_REF_NAME\` branch." \ + --head $branch \ + --base $GITHUB_REF_NAME diff --git a/.github/workflows/changelog.yml b/.github/workflows/changelog.yml index 11e1a61fc54..50404bd538d 100644 --- a/.github/workflows/changelog.yml +++ b/.github/workflows/changelog.yml @@ -13,7 +13,10 @@ on: jobs: changelog: runs-on: ubuntu-latest - if: "!contains(github.event.pull_request.labels.*.name, 'Skip Changelog')" + # TODO update with opentelemetry-python-bot or a shared otel bot + if: | + !contains(github.event.pull_request.labels.*.name, 'Skip Changelog') + && github.actor != 'opentelemetry-java-bot' steps: - uses: actions/checkout@v2 diff --git a/.github/workflows/merge-change-log-to-main.yml b/.github/workflows/merge-change-log-to-main.yml new file mode 100644 index 00000000000..4668d7303e9 --- /dev/null +++ b/.github/workflows/merge-change-log-to-main.yml @@ -0,0 +1,36 @@ +name: Merge change log to main +on: + workflow_dispatch: + +jobs: + create-pull-request: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + with: + # this workflow is run against the release branch (see usage of GITHUB_REF_NAME below) + # but it is creating a pull request against main + ref: main + # history is needed to run format-patch below + fetch-depth: 0 + + - name: Set git user + run: .github/scripts/set-git-user.sh + + # this will fail if there have been conflicting change log updates introduced in main + - name: Create pull request against main + env: + # not using the default GITHUB_TOKEN because pull requests generated by it do not run any workflows + GITHUB_TOKEN: ${{ secrets.BOT_TOKEN }} + run: | + message="Merge change log updates from $GITHUB_REF_NAME" + body="Merge change log updates from \`$GITHUB_REF_NAME\`." + branch="merge-change-log-updates-from-${GITHUB_REF_NAME//\//-}" + + git format-patch --stdout HEAD..origin/$GITHUB_REF_NAME CHANGELOG.md | git apply --3way + git commit -a -m "$message" + git push origin HEAD:$branch + gh pr create --title "$message" \ + --body "$body" \ + --head $branch \ + --base main diff --git a/.github/workflows/prepare-patch-release.yml b/.github/workflows/prepare-patch-release.yml new file mode 100644 index 00000000000..509a08bb90c --- /dev/null +++ b/.github/workflows/prepare-patch-release.yml @@ -0,0 +1,53 @@ +name: Prepare patch release +on: + workflow_dispatch: + +jobs: + prepare-patch-release: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + + - name: Set environment variables + run: | + stable_version=$(./scripts/eachdist.py version --mode stable) + if [[ $stable_version =~ ([0-9]+\.[0-9]+)\.([0-9]+) ]]; then + stable_major_minor="${BASH_REMATCH[1]}" + stable_patch="${BASH_REMATCH[2]}" + else + echo "unexpected stable_version: $stable_version" + exit 1 + fi + + prerelease_version=$(./scripts/eachdist.py version --mode prerelease) + if [[ $prerelease_version =~ 0\.([0-9]+)b([0-9]+) ]]; then + prerelease_minor="${BASH_REMATCH[1]}" + prerelease_patch="${BASH_REMATCH[2]}" + else + echo "unexpected prerelease_version: $prerelease_version" + exit 1 + fi + + echo "STABLE_VERSION=$stable_major_minor.$((stable_patch + 1))" >> $GITHUB_ENV + echo "PRERELEASE_VERSION=0.${prerelease_minor}b$((prerelease_patch + 1))" >> $GITHUB_ENV + + - name: Update version + run: .github/scripts/update-version.sh $STABLE_VERSION $PRERELEASE_VERSION + + - name: Set git user + run: .github/scripts/set-git-user.sh + + - name: Create pull request against the release branch + env: + # not using the default GITHUB_TOKEN because pull requests generated by it do not run any workflows + GITHUB_TOKEN: ${{ secrets.BOT_TOKEN }} + run: | + message="Prepare release $STABLE_VERSION/$PRERELEASE_VERSION" + branch="prepare-release-$STABLE_VERSION-$PRERELEASE_VERSION" + + git commit -a -m "$message" + git push origin HEAD:$branch + gh pr create --title "[$GITHUB_REF_NAME] $message" \ + --body "$message." \ + --head $branch \ + --base $GITHUB_REF_NAME diff --git a/.github/workflows/prepare-release-branch.yml b/.github/workflows/prepare-release-branch.yml new file mode 100644 index 00000000000..871157908ae --- /dev/null +++ b/.github/workflows/prepare-release-branch.yml @@ -0,0 +1,100 @@ +name: Prepare release branch +on: + workflow_dispatch: + +jobs: + create-pull-request-against-release-branch: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + + - name: Create release branch + id: create-release-branch + run: | + stable_version=$(./scripts/eachdist.py version --mode stable) + stable_version=${stable_version//-dev/} + + prerelease_version=$(./scripts/eachdist.py version --mode prerelease) + prerelease_version=${prerelease_version//-dev/} + + stable_version_branch_part=$(echo $stable_version | sed -E 's/([0-9]+)\.([0-9]+)\.0/\1.\2.x/') + prerelease_version_branch_part=$(echo $prerelease_version | sed -E 's/0\.([0-9]+)b0/0.\1bx/') + release_branch_name="release/v$stable_version_branch_part-$prerelease_version_branch_part" + + git push origin HEAD:$release_branch_name + + echo "STABLE_VERSION=$stable_version" >> $GITHUB_ENV + echo "PRERELEASE_VERSION=$prerelease_version" >> $GITHUB_ENV + echo "RELEASE_BRANCH_NAME=$release_branch_name" >> $GITHUB_ENV + + - name: Update version + run: .github/scripts/update-version.sh $STABLE_VERSION $PRERELEASE_VERSION + + - name: Set git user + run: .github/scripts/set-git-user.sh + + - name: Create pull request against the release branch + env: + # not using the default GITHUB_TOKEN because pull requests generated by it do not run any workflows + GITHUB_TOKEN: ${{ secrets.BOT_TOKEN }} + run: | + message="Prepare release $STABLE_VERSION/$PRERELEASE_VERSION" + branch="prepare-release-$STABLE_VERSION-$PRERELEASE_VERSION" + + git commit -a -m "$message" + git push origin HEAD:$branch + gh pr create --title "[$RELEASE_BRANCH_NAME] $message" \ + --body "$message." \ + --head $branch \ + --base $RELEASE_BRANCH_NAME + + create-pull-request-against-main: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + + - name: Set environment variables + run: | + stable_version=$(./scripts/eachdist.py version --mode stable) + stable_version=${stable_version//-dev/} + if [[ $stable_version =~ ([0-9]+)\.([0-9]+)\.[0-9]+ ]]; then + stable_major="${BASH_REMATCH[1]}" + stable_minor="${BASH_REMATCH[2]}" + else + echo "unexpected stable_version: $stable_version" + exit 1 + fi + + prerelease_version=$(./scripts/eachdist.py version --mode prerelease) + prerelease_version=${prerelease_version//-dev/} + if [[ $prerelease_version =~ 0\.([0-9]+)b[0-9]+ ]]; then + prerelease_minor="${BASH_REMATCH[1]}" + else + echo "unexpected prerelease_version: $prerelease_version" + exit 1 + fi + + echo "NEXT_STABLE_VERSION=$stable_major.$((stable_minor + 1)).0-dev" >> $GITHUB_ENV + echo "NEXT_PRERELEASE_VERSION=0.$((prerelease_minor + 1))b0-dev" >> $GITHUB_ENV + + - name: Update version + run: .github/scripts/update-version.sh $NEXT_STABLE_VERSION $NEXT_PRERELEASE_VERSION + + - name: Set git user + run: .github/scripts/set-git-user.sh + + - name: Create pull request against main + env: + # not using the default GITHUB_TOKEN because pull requests generated by it do not run any workflows + GITHUB_TOKEN: ${{ secrets.BOT_TOKEN }} + run: | + message="Update version to $NEXT_STABLE_VERSION/$NEXT_PRERELEASE_VERSION" + body="Update version to \`$NEXT_STABLE_VERSION/$NEXT_PRERELEASE_VERSION\`." + branch="update-version-to-$NEXT_STABLE_VERSION-$NEXT_PRERELEASE_VERSION" + + git commit -a -m "$message" + git push origin HEAD:$branch + gh pr create --title "$message" \ + --body "$body" \ + --head $branch \ + --base main diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 00000000000..aca51ccc79e --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,99 @@ +name: Release +on: + workflow_dispatch: + +jobs: + release: + runs-on: ubuntu-latest + steps: + - run: | + if [[ $GITHUB_REF_NAME != release/* ]]; then + echo the release workflow should only be run against release branches + exit 1 + fi + + - uses: actions/checkout@v3 + + - name: Set environment variables + run: | + stable_version=$(./scripts/eachdist.py version --mode stable) + prerelease_version=$(./scripts/eachdist.py version --mode prerelease) + + if [[ $stable_version =~ ([0-9]+)\.([0-9]+)\.([0-9]+) ]]; then + stable_major="${BASH_REMATCH[1]}" + stable_minor="${BASH_REMATCH[2]}" + stable_patch="${BASH_REMATCH[3]}" + else + echo "unexpected stable_version: $stable_version" + exit 1 + fi + if [[ $stable_patch != 0 ]]; then + if [[ $prerelease_version =~ 0\.([0-9]+)b([0-9]+) ]]; then + prerelease_minor="${BASH_REMATCH[1]}" + prerelease_patch="${BASH_REMATCH[2]}" + else + echo "unexpected prerelease_version: $prerelease_version" + exit 1 + fi + if [[ $prerelease_patch != 0 ]]; then + prior_combined_version_when_patch="$stable_major.$stable_minor.$((stable_patch - 1))/0.${prerelease_minor}b$((prerelease_patch - 1))" + fi + fi + + echo "STABLE_VERSION=$stable_version" >> $GITHUB_ENV + echo "PRERELEASE_VERSION=$prerelease_version" >> $GITHUB_ENV + + echo "PRIOR_COMBINED_VERSION_WHEN_PATCH=$prior_combined_version_when_patch" >> $GITHUB_ENV + + - name: Generate release notes + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + # conditional block not indented because of the heredoc + if [[ ! -z $PRIOR_COMBINED_VERSION_WHEN_PATCH ]]; then + cat > release-notes.txt << EOF + This is a patch release on the previous $PRIOR_COMBINED_VERSION_WHEN_PATCH release, fixing the issue(s) below. + + EOF + fi + + # the complex perl regex is needed because markdown docs render newlines as soft wraps + # while release notes render them as line breaks + sed -n "0,/^## Version $STABLE_VERSION\/$PRERELEASE_VERSION/d;/^## Version /q;p" CHANGELOG.md \ + | perl -0pe 's/(?> release-notes.txt + + - name: Create GitHub release + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + gh release create --target $GITHUB_REF_NAME \ + --title "Version $STABLE_VERSION/$PRERELEASE_VERSION" \ + --notes-file release-notes.txt \ + --discussion-category announcements \ + v$STABLE_VERSION + + - name: Update the change log with the release date + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + date=$(gh release view v$STABLE_VERSION --json publishedAt --jq .publishedAt | sed 's/T.*//') + sed -Ei "s/## Version $STABLE_VERSION\/$PRERELEASE_VERSION .*/## Version $STABLE_VERSION\/$PRERELEASE_VERSION ($date)/" CHANGELOG.md + + - name: Set git user + run: .github/scripts/set-git-user.sh + + - name: Create pull request against the release branch + env: + # not using the default GITHUB_TOKEN because pull requests generated by it do not run any workflows + GITHUB_TOKEN: ${{ secrets.BOT_TOKEN }} + run: | + message="Add the release date for $STABLE_VERSION/$PRERELEASE_VERSION to the change log" + branch="add-release-date-for-$STABLE_VERSION-$PRERELEASE_VERSION" + + git commit -a -m "$message" + git push origin HEAD:$branch + gh pr create --title "[$GITHUB_REF_NAME] $message" \ + --body "$message." \ + --head $branch \ + --base $GITHUB_REF_NAME diff --git a/scripts/eachdist.py b/scripts/eachdist.py index 0c0620e95ac..093c7028c61 100755 --- a/scripts/eachdist.py +++ b/scripts/eachdist.py @@ -547,55 +547,6 @@ def lint_args(args): ) -def update_changelog(path, version, new_entry): - unreleased_changes = False - try: - with open(path, encoding="utf-8") as changelog: - text = changelog.read() - if f"## [{version}]" in text: - raise AttributeError( - f"{path} already contains version {version}" - ) - with open(path, encoding="utf-8") as changelog: - for line in changelog: - if line.startswith("## [Unreleased]"): - unreleased_changes = False - elif line.startswith("## "): - break - elif len(line.strip()) > 0: - unreleased_changes = True - - except FileNotFoundError: - print(f"file missing: {path}") - return - - if unreleased_changes: - print(f"updating: {path}") - text = re.sub(r"## \[Unreleased\].*", new_entry, text) - with open(path, "w", encoding="utf-8") as changelog: - changelog.write(text) - - -def update_changelogs(version): - today = datetime.now().strftime("%Y-%m-%d") - new_entry = """## [Unreleased](https://github.com/open-telemetry/opentelemetry-python/compare/v{version}...HEAD) - -## [{version}](https://github.com/open-telemetry/opentelemetry-python/releases/tag/v{version}) - {today} - -""".format( - version=version, today=today - ) - errors = False - try: - update_changelog("./CHANGELOG.md", version, new_entry) - except Exception as err: # pylint: disable=broad-except - print(str(err)) - errors = True - - if errors: - sys.exit(1) - - def find(name, path): for root, _, files in os.walk(path): if name in files: @@ -675,9 +626,6 @@ def release_args(args): update_dependencies(targets, version, packages) update_version_files(targets, version, packages) - update_changelogs(updated_versions[0]) - - def test_args(args): clean_remainder_args(args.pytestargs) execute_args( From 9c89e047071149a6962f3029bfb43e95ee825f31 Mon Sep 17 00:00:00 2001 From: Trask Stalnaker Date: Wed, 27 Apr 2022 16:25:29 -0700 Subject: [PATCH 03/51] Update change log format --- CHANGELOG.md | 90 +++++++++++++++++++++++++--------------------------- 1 file changed, 43 insertions(+), 47 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7cab9302a09..501bc9b480c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,7 +5,7 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). -## [Unreleased](https://github.com/open-telemetry/opentelemetry-python/compare/v1.13.0...HEAD) +## Unreleased - Update explicit histogram bucket boundaries ([#2947](https://github.com/open-telemetry/opentelemetry-python/pull/2947)) @@ -14,9 +14,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Add http-metric instrument names to semantic conventions ([#2976](https://github.com/open-telemetry/opentelemetry-python/pull/2976)) -## [1.13.0-0.34b0](https://github.com/open-telemetry/opentelemetry-python/releases/tag/v1.13.0) - 2022-09-26 - - +## Version 1.13.0/0.34b0 (2022-09-26) - Add a configurable max_export_batch_size to the gRPC metrics exporter ([#2809](https://github.com/open-telemetry/opentelemetry-python/pull/2809)) @@ -39,7 +37,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Add force_flush to span exporters ([#2919](https://github.com/open-telemetry/opentelemetry-python/pull/2919)) -## [1.12.0-0.33b0](https://github.com/open-telemetry/opentelemetry-python/releases/tag/v1.12.0) - 2022-08-08 +## Version 1.12.0/0.33b0 (2022-08-08) - Add `force_flush` method to metrics exporter ([#2852](https://github.com/open-telemetry/opentelemetry-python/pull/2852)) @@ -59,7 +57,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Instrument instances are always created through a Meter ([#2844](https://github.com/open-telemetry/opentelemetry-python/pull/2844)) -## [1.12.0rc2-0.32b0](https://github.com/open-telemetry/opentelemetry-python/releases/tag/v1.12.0rc2) - 2022-07-04 +## Version 1.12.0rc2/0.32b0 (2022-07-04) - Fix instrument name and unit regexes ([#2796](https://github.com/open-telemetry/opentelemetry-python/pull/2796)) @@ -103,8 +101,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 to the API reference documentation ([#2785](https://github.com/open-telemetry/opentelemetry-python/pull/2785)) - -## [1.12.0rc1-0.31b0](https://github.com/open-telemetry/opentelemetry-python/releases/tag/v1.12.0rc1) - 2022-05-17 +## Version 1.12.0rc1/0.31b0 (2022-05-17) - Fix LoggingHandler to handle LogRecord with exc_info=False ([#2690](https://github.com/open-telemetry/opentelemetry-python/pull/2690)) @@ -127,7 +124,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Move Metrics API behind internal package ([#2651](https://github.com/open-telemetry/opentelemetry-python/pull/2651)) -## [1.11.1-0.30b1](https://github.com/open-telemetry/opentelemetry-python/releases/tag/v1.11.1) - 2022-04-21 +## Version 1.11.1/0.30b1 (2022-04-21) - Add parameter to MetricReader constructor to select aggregation per instrument kind ([#2638](https://github.com/open-telemetry/opentelemetry-python/pull/2638)) @@ -143,7 +140,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Deprecate InstrumentationLibraryInfo and Add InstrumentationScope ([#2583](https://github.com/open-telemetry/opentelemetry-python/pull/2583)) -## [1.11.0-0.30b0](https://github.com/open-telemetry/opentelemetry-python/releases/tag/v1.11.0) - 2022-04-18 +## Version 1.11.0/0.30b0 (2022-04-18) - Rename API Measurement for async instruments to Observation ([#2617](https://github.com/open-telemetry/opentelemetry-python/pull/2617)) @@ -177,7 +174,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Update opentelemetry-proto to v0.16.0 ([#2619](https://github.com/open-telemetry/opentelemetry-python/pull/2619)) -## [1.10.0-0.29b0](https://github.com/open-telemetry/opentelemetry-python/releases/tag/v1.10.0) - 2022-03-10 +## Version 1.10.0/0.29b0 (2022-03-10) - Docs rework: [non-API docs are moving](https://github.com/open-telemetry/opentelemetry-python/issues/2172) to @@ -198,13 +195,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - [exporter/opentelemetry-exporter-prometheus] restore package using the new metrics API ([#2321](https://github.com/open-telemetry/opentelemetry-python/pull/2321)) -## [1.9.1-0.28b1](https://github.com/open-telemetry/opentelemetry-python/releases/tag/v1.9.1) - 2022-01-29 +## Version 1.9.1/0.28b1 (2022-01-29) - Update opentelemetry-proto to v0.12.0. Note that this update removes deprecated status codes. ([#2415](https://github.com/open-telemetry/opentelemetry-python/pull/2415)) -## [1.9.0-0.28b0](https://github.com/open-telemetry/opentelemetry-python/releases/tag/v1.9.0) - 2022-01-26 - +## Version 1.9.0/0.28b0 (2022-01-26) - Fix SpanLimits global span limit defaulting when set to 0 ([#2398](https://github.com/open-telemetry/opentelemetry-python/pull/2398)) @@ -227,7 +223,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - [logs] prevent None from causing problems ([#2410](https://github.com/open-telemetry/opentelemetry-python/pull/2410)) -## [1.8.0-0.27b0](https://github.com/open-telemetry/opentelemetry-python/releases/tag/v1.8.0) - 2021-12-17 +## Version 1.8.0/0.27b0 (2021-12-17) - Adds Aggregation and instruments as part of Metrics SDK ([#2234](https://github.com/open-telemetry/opentelemetry-python/pull/2234)) @@ -246,7 +242,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Support insecure configuration for OTLP gRPC exporter ([#2350](https://github.com/open-telemetry/opentelemetry-python/pull/2350)) -## [1.7.1-0.26b1](https://github.com/open-telemetry/opentelemetry-python/releases/tag/v1.7.0) - 2021-11-11 +## Version 1.7.1/0.26b1 (2021-11-11) - Add support for Python 3.10 ([#2207](https://github.com/open-telemetry/opentelemetry-python/pull/2207)) @@ -267,12 +263,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - `opentelemetry-test` start releasing to pypi.org ([#2269](https://github.com/open-telemetry/opentelemetry-python/pull/2269)) -## [1.6.2-0.25b2](https://github.com/open-telemetry/opentelemetry-python/releases/tag/v1.6.2) - 2021-10-19 +## Version 1.6.2/0.25b2 (2021-10-19) - Fix parental trace relationship for opentracing `follows_from` reference ([#2180](https://github.com/open-telemetry/opentelemetry-python/pull/2180)) -## [1.6.1-0.25b1](https://github.com/open-telemetry/opentelemetry-python/releases/tag/v1.6.1) - 2021-10-18 +## Version 1.6.1/0.25b1 (2021-10-18) - Fix ReadableSpan property types attempting to create a mapping from a list ([#2215](https://github.com/open-telemetry/opentelemetry-python/pull/2215)) @@ -281,7 +277,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Propagation: only warn about oversized baggage headers when headers exist ([#2212](https://github.com/open-telemetry/opentelemetry-python/pull/2212)) -## [1.6.0-0.25b0](https://github.com/open-telemetry/opentelemetry-python/releases/tag/v1.6.0) - 2021-10-13 +## Version 1.6.0/0.25b0 (2021-10-13) - Fix race in `set_tracer_provider()` ([#2182](https://github.com/open-telemetry/opentelemetry-python/pull/2182)) @@ -319,7 +315,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Add name to `BatchSpanProcessor` worker thread ([#2186](https://github.com/open-telemetry/opentelemetry-python/pull/2186)) -## [1.5.0-0.24b0](https://github.com/open-telemetry/opentelemetry-python/releases/tag/v1.5.0) - 2021-08-26 +## Version 1.5.0/0.24b0 (2021-08-26) - Add pre and post instrumentation entry points ([#1983](https://github.com/open-telemetry/opentelemetry-python/pull/1983)) @@ -345,14 +341,14 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - `opentelemetry-api` Attribute keys must be non-empty strings. ([#2057](https://github.com/open-telemetry/opentelemetry-python/pull/2057)) -## [0.23.1](https://github.com/open-telemetry/opentelemetry-python/pull/1987) - 2021-07-26 +## Version 0.23.1 (2021-07-26) ### Changed - Fix opentelemetry-bootstrap dependency script. ([#1987](https://github.com/open-telemetry/opentelemetry-python/pull/1987)) -## [1.4.0-0.23b0](https://github.com/open-telemetry/opentelemetry-python/releases/tag/v1.4.0) - 2021-07-21 +## Version 1.4.0/0.23b0 (2021-07-21) ### Added @@ -403,7 +399,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 opentelemetry specification format, rather than opentracing spec format. ([#1878](https://github.com/open-telemetry/opentelemetry-python/pull/1878)) -## [1.3.0-0.22b0](https://github.com/open-telemetry/opentelemetry-python/releases/tag/v1.3.0) - 2021-06-01 +## Version 1.3.0/0.22b0 (2021-06-01) ### Added @@ -425,7 +421,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Update protos to latest version release 0.9.0 ([#1873](https://github.com/open-telemetry/opentelemetry-python/pull/1873)) -## [1.2.0, 0.21b0](https://github.com/open-telemetry/opentelemetry-python/releases/tag/v1.2.0) - 2021-05-11 +## Version 1.2.0/0.21b0 (2021-05-11) ### Added @@ -473,7 +469,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Moved `opentelemetry-instrumentation` to contrib repository. ([#1797](https://github.com/open-telemetry/opentelemetry-python/pull/1797)) -## [1.1.0](https://github.com/open-telemetry/opentelemetry-python/releases/tag/v1.1.0) - 2021-04-20 +## Version 1.1.0 (2021-04-20) ### Added @@ -513,7 +509,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 a secure connection or not. ([#1771](https://github.com/open-telemetry/opentelemetry-python/pull/1771)) -## [1.0.0](https://github.com/open-telemetry/opentelemetry-python/releases/tag/v1.0.0) - 2021-03-26 +## Version 1.0.0 (2021-03-26) ### Added @@ -597,7 +593,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Removing support for Python 3.5 ([#1706](https://github.com/open-telemetry/opentelemetry-python/pull/1706)) -## [0.19b0](https://github.com/open-telemetry/opentelemetry-python/releases/tag/v0.19b0) - 2021-03-26 +## Version 0.19b0 (2021-03-26) ### Changed @@ -612,14 +608,14 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Removing support for Python 3.5 ([#1706](https://github.com/open-telemetry/opentelemetry-python/pull/1706)) -## [0.18b0](https://github.com/open-telemetry/opentelemetry-python/releases/tag/v0.18b0) - 2021-02-16 +## Version 0.18b0 (2021-02-16) ### Added - Add urllib to opentelemetry-bootstrap target list ([#1584](https://github.com/open-telemetry/opentelemetry-python/pull/1584)) -## [1.0.0rc1](https://github.com/open-telemetry/opentelemetry-python/releases/tag/v1.0.0rc1) - 2021-02-12 +## Version 1.0.0rc1 (2021-02-12) ### Changed @@ -652,7 +648,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Remove Metrics as part of stable, marked as experimental ([#1568](https://github.com/open-telemetry/opentelemetry-python/pull/1568)) -## [0.17b0](https://github.com/open-telemetry/opentelemetry-python/releases/tag/v0.17b0) - 2021-01-20 +## Version 0.17b0 (2021-01-20) ### Added @@ -724,14 +720,14 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - `opentelemetry-api` Remove ThreadLocalRuntimeContext since python3.4 is not supported. -## [0.16b1](https://github.com/open-telemetry/opentelemetry-python/releases/tag/v0.16b1) - 2020-11-26 +## Version 0.16b1 (2020-11-26) ### Added - Add meter reference to observers ([#1425](https://github.com/open-telemetry/opentelemetry-python/pull/1425)) -## [0.16b0](https://github.com/open-telemetry/opentelemetry-python/releases/tag/v0.16b0) - 2020-11-25 +## Version 0.16b0 (2020-11-25) ### Added @@ -776,7 +772,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 erasure for dropped spans or spans sampled by the `TraceIdRatioBased` sampler. ([#1394](https://github.com/open-telemetry/opentelemetry-python/pull/1394)) -## [0.15b0](https://github.com/open-telemetry/opentelemetry-python/releases/tag/v0.15b0) -2020-11-02 +## Version 0.15b0 (2020-11-02) ### Added @@ -807,7 +803,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Remove TracerProvider coupling from Tracer init ([#1295](https://github.com/open-telemetry/opentelemetry-python/pull/1295)) -## [0.14b0](https://github.com/open-telemetry/opentelemetry-python/releases/tag/v0.14b0) - 2020-10-13 +## Version 0.14b0 (2020-10-13) ### Added @@ -859,7 +855,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - `start_as_current_span` and `use_span` can now optionally auto-record any exceptions raised inside the context manager. ([#1162](https://github.com/open-telemetry/opentelemetry-python/pull/1162)) -## [0.13b0](https://github.com/open-telemetry/opentelemetry-python/releases/tag/v0.13b0) - 2020-09-17 +## Version 0.13b0 (2020-09-17) ### Added @@ -918,7 +914,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Drop support for Python 3.4 ([#1099](https://github.com/open-telemetry/opentelemetry-python/pull/1099)) -## [0.12b0](https://github.com/open-telemetry/opentelemetry-python/releases/tag/v0.12.0) - 2020-08-14 +## Version 0.12b0 (2020-08-14) ### Added @@ -950,7 +946,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Update environment variable `OTEL_RESOURCE` to `OTEL_RESOURCE_ATTRIBUTES` as per the specification -## [0.11b0](https://github.com/open-telemetry/opentelemetry-python/releases/tag/v0.11.0) - 2020-07-28 +## Version 0.11b0 (2020-07-28) ### Added @@ -966,7 +962,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Update span exporter to use OpenTelemetry Proto v0.4.0 ([#872](https://github.com/open-telemetry/opentelemetry-python/pull/889)) -## [0.10b0](https://github.com/open-telemetry/opentelemetry-python/releases/tag/v0.10.0) - 2020-06-23 +## Version 0.10b0 (2020-06-23) ### Changed @@ -975,7 +971,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Rename CounterAggregator -> SumAggregator ([#816](https://github.com/open-telemetry/opentelemetry-python/pull/816)) -## [0.9b0](https://github.com/open-telemetry/opentelemetry-python/releases/tag/v0.9.0) - 2020-06-10 +## Version 0.9b0 (2020-06-10) ### Added @@ -1002,7 +998,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Rename opentelemetry-auto-instrumentation to opentelemetry-instrumentation, and console script `opentelemetry-auto-instrumentation` to `opentelemetry-instrument` -## [0.8b0](https://github.com/open-telemetry/opentelemetry-python/releases/tag/v0.8.0) - 2020-05-27 +## Version 0.8b0 (2020-05-27) ### Added @@ -1036,7 +1032,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - deep copy empty attributes ([#714](https://github.com/open-telemetry/opentelemetry-python/pull/714)) -## [0.7b1](https://github.com/open-telemetry/opentelemetry-python/releases/tag/v0.7.1) - 2020-05-12 +## Version 0.7b1 (2020-05-12) ### Added @@ -1081,7 +1077,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - bugfix: freezing span attribute sequences, reducing potential user errors ([#529](https://github.com/open-telemetry/opentelemetry-python/pull/529)) -## [0.6b0](https://github.com/open-telemetry/opentelemetry-python/releases/tag/v0.6.0) - 2020-03-30 +## Version 0.6b0 (2020-03-30) ### Added @@ -1102,7 +1098,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Exporting to collector now works ([#508](https://github.com/open-telemetry/opentelemetry-python/pull/508)) -## [0.5b0](https://github.com/open-telemetry/opentelemetry-python/releases/tag/v0.5.0) - 2020-03-16 +## Version 0.5b0 (2020-03-16) ### Added @@ -1137,7 +1133,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Implement observer instrument ([#425](https://github.com/open-telemetry/opentelemetry-python/pull/425)) -## [0.4a0](https://github.com/open-telemetry/opentelemetry-python/releases/tag/v0.4.0) - 2020-02-21 +## Version 0.4a0 (2020-02-21) ### Added @@ -1192,7 +1188,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Remove monotonic and absolute metric instruments ([#410](https://github.com/open-telemetry/opentelemetry-python/pull/410)) -## [0.3a0](https://github.com/open-telemetry/opentelemetry-python/releases/tag/v0.3.0) - 2019-12-11 +## Version 0.3a0 (2019-12-11) ### Added @@ -1211,7 +1207,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Remove option to create unstarted spans from API ([#290](https://github.com/open-telemetry/opentelemetry-python/pull/290)) -## [0.2a0](https://github.com/open-telemetry/opentelemetry-python/releases/tag/v0.2.0) - 2019-10-29 +## Version 0.2a0 (2019-10-29) ### Added @@ -1228,7 +1224,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Multiple context API changes - Multiple bugfixes and improvements -## [0.1a0](https://github.com/open-telemetry/opentelemetry-python/releases/tag/v0.1.0) - 2019-09-30 +## Version 0.1a0 (2019-09-30) ### Added From be68b97e33134aadeb93d2d228d04a3bdfd25722 Mon Sep 17 00:00:00 2001 From: Trask Stalnaker Date: Wed, 27 Apr 2022 18:25:38 -0700 Subject: [PATCH 04/51] Update RELEASING.md --- RELEASING.md | 98 ++++++++++++++++++++++++++++++---------------------- 1 file changed, 56 insertions(+), 42 deletions(-) diff --git a/RELEASING.md b/RELEASING.md index 975fdf94409..c2353cbd5de 100644 --- a/RELEASING.md +++ b/RELEASING.md @@ -1,48 +1,62 @@ -# Releasing OpenTelemetry Packages (for maintainers only) -This document explains how to publish all OT modules at version x.y.z. Ensure that you’re following semver when choosing a version number. +# Release instructions + +## Preparing a new major or minor release + +* Merge a pull request to `main` updating the `CHANGELOG.md`. + * The heading for the release should include the release version but not the release date, e.g. + `## Version 1.9.0 (unreleased)`. + * Use `.github/scripts/draft-change-log-entries.sh` as a starting point for writing the change + log. +* Run the [Prepare release branch workflow](https://github.com/trask/repository-template/actions/workflows/prepare-release-branch.yml). + * Press the "Run workflow" button, and leave the default branch `main` selected. +* Review and merge the two pull requests that it creates + (one is targeted to the release branch and one is targeted to `main`). + +## Preparing a new patch release + +* Backport pull request(s) to the release branch. + * Run the [Backport workflow](https://github.com/trask/repository-template/actions/workflows/backport.yml). + * Press the "Run workflow" button, then select the release branch from the dropdown list, + e.g. `release/v1.9.x`, then enter the pull request number that you want to backport, + then click the "Run workflow" button below that. + * Review and merge the backport pull request that it generates. +* Merge a pull request to the release branch updating the `CHANGELOG.md`. + * The heading for the release should include the release version but not the release date, e.g. + `## Version 1.9.1 (Unreleased)`. +* Run the [Prepare patch release workflow](https://github.com/trask/repository-template/actions/workflows/prepare-patch-release.yml). + * Press the "Run workflow" button, then select the release branch from the dropdown list, + e.g. `release/v1.9.x`, and click the "Run workflow" button below that. +* Review and merge the pull request that it creates. + +## Making the release + +Run the [Release workflow](https://github.com/trask/repository-template/actions/workflows/release.yml). + +* Press the "Run workflow" button, then select the release branch from the dropdown list, + e.g. `release/v1.9.x`, and click the "Run workflow" button below that. +* This workflow will publish the artifacts and publish a GitHub release with release notes based on the change log. +* Review and merge the pull request that the release workflow creates against the release branch + which adds the release date to the change log. + +## After the release + +Run the [Merge change log to main workflow](https://github.com/trask/repository-template/actions/workflows/merge-change-log-to-main.yml). + +* Press the "Run workflow" button, then select the release branch from the dropdown list, + e.g. `release/v1.9.x`, and click the "Run workflow" button below that. +* This will create a pull request that merges the change log updates from the release branch + back to `main`. +* Review and merge the pull request that it creates. +* This workflow will fail if there have been conflicting change log updates introduced in `main`, + in which case you will need to merge the change log updates manually and send your own pull + request against `main`. + Release Process: -- [Checkout a clean repo](#checkout-a-clean-repo) -- [Update versions](#update-versions) -- [Create a new branch](#create-a-new-branch) -- [Open a Pull Request](#open-a-pull-request) -- [Create a Release](#create-a-release) -- [Check PyPI](#check-pypi) -- [Move stable tag](#move-stable-tag) -- [Update main](#update-main) -- [Hotfix procedure](#hotfix-procedure) +- [Check PyPI](#Check-PyPI) +- [Move stable tag](#Move-stable-tag) +- [Update main](#Update-main) - [Troubleshooting](#troubleshooting) - - [Publish failed](#publish-failed) - -## Checkout a clean repo -To avoid pushing untracked changes, check out the repo in a new dir - -## Update versions -The update of the version information relies on the information in eachdist.ini to identify which packages are stable, prerelease or -experimental. Update the desired version there to begin the release process. - -## Create a new branch -The following script does the following: -- update main locally -- creates a new release branch `release/` -- updates version and changelog files -- commits the change - -*NOTE: This script was run by a GitHub Action but required the Action bot to be excluded from the CLA check, which it currently is not.* - -```bash -./scripts/prepare_release.sh -``` - -## Open a Pull Request - -The PR should be opened from the `release/` branch created as part of running `prepare_release.sh` in the steps above. - -## Create a Release - -- Create the GH release from the main branch, using a new tag for this micro version, e.g. `v0.7.0` -- Copy the changelogs from all packages that changed into the release notes (and reformat to remove hard line wraps) - ## Check PyPI From 740624092aefc4f6b7e23f8445e461361c1e3be2 Mon Sep 17 00:00:00 2001 From: Trask Stalnaker Date: Mon, 9 May 2022 19:07:27 -0700 Subject: [PATCH 05/51] More explicit variable substitution --- .github/workflows/backport.yml | 2 +- .github/workflows/prepare-patch-release.yml | 4 ++-- .github/workflows/prepare-release-branch.yml | 12 ++++++------ .github/workflows/release.yml | 4 ++-- 4 files changed, 11 insertions(+), 11 deletions(-) diff --git a/.github/workflows/backport.yml b/.github/workflows/backport.yml index 0eb503f5248..31c73b755cc 100644 --- a/.github/workflows/backport.yml +++ b/.github/workflows/backport.yml @@ -28,7 +28,7 @@ jobs: title=$(gh pr view $NUMBER --json title --jq .title) url=$(gh pr view $NUMBER --json url --jq .url) - branch="backport-$NUMBER-to-${GITHUB_REF_NAME//\//-}" + branch="backport-${NUMBER}-to-${GITHUB_REF_NAME//\//-}" git cherry-pick $commit git push origin HEAD:$branch diff --git a/.github/workflows/prepare-patch-release.yml b/.github/workflows/prepare-patch-release.yml index 509a08bb90c..b9d6765209f 100644 --- a/.github/workflows/prepare-patch-release.yml +++ b/.github/workflows/prepare-patch-release.yml @@ -42,8 +42,8 @@ jobs: # not using the default GITHUB_TOKEN because pull requests generated by it do not run any workflows GITHUB_TOKEN: ${{ secrets.BOT_TOKEN }} run: | - message="Prepare release $STABLE_VERSION/$PRERELEASE_VERSION" - branch="prepare-release-$STABLE_VERSION-$PRERELEASE_VERSION" + message="Prepare release ${STABLE_VERSION}/${PRERELEASE_VERSION}" + branch="prepare-release-${STABLE_VERSION}-${PRERELEASE_VERSION}" git commit -a -m "$message" git push origin HEAD:$branch diff --git a/.github/workflows/prepare-release-branch.yml b/.github/workflows/prepare-release-branch.yml index 871157908ae..c9bc4232d3e 100644 --- a/.github/workflows/prepare-release-branch.yml +++ b/.github/workflows/prepare-release-branch.yml @@ -19,7 +19,7 @@ jobs: stable_version_branch_part=$(echo $stable_version | sed -E 's/([0-9]+)\.([0-9]+)\.0/\1.\2.x/') prerelease_version_branch_part=$(echo $prerelease_version | sed -E 's/0\.([0-9]+)b0/0.\1bx/') - release_branch_name="release/v$stable_version_branch_part-$prerelease_version_branch_part" + release_branch_name="release/v${stable_version_branch_part}-${prerelease_version_branch_part}" git push origin HEAD:$release_branch_name @@ -38,8 +38,8 @@ jobs: # not using the default GITHUB_TOKEN because pull requests generated by it do not run any workflows GITHUB_TOKEN: ${{ secrets.BOT_TOKEN }} run: | - message="Prepare release $STABLE_VERSION/$PRERELEASE_VERSION" - branch="prepare-release-$STABLE_VERSION-$PRERELEASE_VERSION" + message="Prepare release ${STABLE_VERSION}/${PRERELEASE_VERSION}" + branch="prepare-release-${STABLE_VERSION}-${PRERELEASE_VERSION}" git commit -a -m "$message" git push origin HEAD:$branch @@ -88,9 +88,9 @@ jobs: # not using the default GITHUB_TOKEN because pull requests generated by it do not run any workflows GITHUB_TOKEN: ${{ secrets.BOT_TOKEN }} run: | - message="Update version to $NEXT_STABLE_VERSION/$NEXT_PRERELEASE_VERSION" - body="Update version to \`$NEXT_STABLE_VERSION/$NEXT_PRERELEASE_VERSION\`." - branch="update-version-to-$NEXT_STABLE_VERSION-$NEXT_PRERELEASE_VERSION" + message="Update version to ${NEXT_STABLE_VERSION}/${NEXT_PRERELEASE_VERSION}" + body="Update version to \`${NEXT_STABLE_VERSION}/${NEXT_PRERELEASE_VERSION}\`." + branch="update-version-to-${NEXT_STABLE_VERSION}-${NEXT_PRERELEASE_VERSION}" git commit -a -m "$message" git push origin HEAD:$branch diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index aca51ccc79e..015e13c34ee 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -88,8 +88,8 @@ jobs: # not using the default GITHUB_TOKEN because pull requests generated by it do not run any workflows GITHUB_TOKEN: ${{ secrets.BOT_TOKEN }} run: | - message="Add the release date for $STABLE_VERSION/$PRERELEASE_VERSION to the change log" - branch="add-release-date-for-$STABLE_VERSION-$PRERELEASE_VERSION" + message="Add the release date for ${STABLE_VERSION}/${PRERELEASE_VERSION} to the change log" + branch="add-release-date-for-${STABLE_VERSION}-${PRERELEASE_VERSION}" git commit -a -m "$message" git push origin HEAD:$branch From 550c80f234e5570b7357bd415380a282521d4112 Mon Sep 17 00:00:00 2001 From: Trask Stalnaker Date: Tue, 10 May 2022 10:34:13 -0700 Subject: [PATCH 06/51] Fix links --- RELEASING.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/RELEASING.md b/RELEASING.md index c2353cbd5de..301fdd48583 100644 --- a/RELEASING.md +++ b/RELEASING.md @@ -7,7 +7,7 @@ `## Version 1.9.0 (unreleased)`. * Use `.github/scripts/draft-change-log-entries.sh` as a starting point for writing the change log. -* Run the [Prepare release branch workflow](https://github.com/trask/repository-template/actions/workflows/prepare-release-branch.yml). +* Run the [Prepare release branch workflow](https://github.com/open-telemetry/opentelemetry-python/actions/workflows/prepare-release-branch.yml). * Press the "Run workflow" button, and leave the default branch `main` selected. * Review and merge the two pull requests that it creates (one is targeted to the release branch and one is targeted to `main`). @@ -15,7 +15,7 @@ ## Preparing a new patch release * Backport pull request(s) to the release branch. - * Run the [Backport workflow](https://github.com/trask/repository-template/actions/workflows/backport.yml). + * Run the [Backport workflow](https://github.com/open-telemetry/opentelemetry-python/actions/workflows/backport.yml). * Press the "Run workflow" button, then select the release branch from the dropdown list, e.g. `release/v1.9.x`, then enter the pull request number that you want to backport, then click the "Run workflow" button below that. @@ -23,14 +23,14 @@ * Merge a pull request to the release branch updating the `CHANGELOG.md`. * The heading for the release should include the release version but not the release date, e.g. `## Version 1.9.1 (Unreleased)`. -* Run the [Prepare patch release workflow](https://github.com/trask/repository-template/actions/workflows/prepare-patch-release.yml). +* Run the [Prepare patch release workflow](https://github.com/open-telemetry/opentelemetry-python/actions/workflows/prepare-patch-release.yml). * Press the "Run workflow" button, then select the release branch from the dropdown list, e.g. `release/v1.9.x`, and click the "Run workflow" button below that. * Review and merge the pull request that it creates. ## Making the release -Run the [Release workflow](https://github.com/trask/repository-template/actions/workflows/release.yml). +Run the [Release workflow](https://github.com/open-telemetry/opentelemetry-python/actions/workflows/release.yml). * Press the "Run workflow" button, then select the release branch from the dropdown list, e.g. `release/v1.9.x`, and click the "Run workflow" button below that. @@ -40,7 +40,7 @@ Run the [Release workflow](https://github.com/trask/repository-template/actions/ ## After the release -Run the [Merge change log to main workflow](https://github.com/trask/repository-template/actions/workflows/merge-change-log-to-main.yml). +Run the [Merge change log to main workflow](https://github.com/open-telemetry/opentelemetry-python/actions/workflows/merge-change-log-to-main.yml). * Press the "Run workflow" button, then select the release branch from the dropdown list, e.g. `release/v1.9.x`, and click the "Run workflow" button below that. From a27cc17d56015b1a1f13ee50b723ec7eefffa530 Mon Sep 17 00:00:00 2001 From: Trask Stalnaker Date: Tue, 10 May 2022 19:40:24 -0700 Subject: [PATCH 07/51] Remove unused section --- RELEASING.md | 2 -- 1 file changed, 2 deletions(-) diff --git a/RELEASING.md b/RELEASING.md index 301fdd48583..50abf3da955 100644 --- a/RELEASING.md +++ b/RELEASING.md @@ -5,8 +5,6 @@ * Merge a pull request to `main` updating the `CHANGELOG.md`. * The heading for the release should include the release version but not the release date, e.g. `## Version 1.9.0 (unreleased)`. - * Use `.github/scripts/draft-change-log-entries.sh` as a starting point for writing the change - log. * Run the [Prepare release branch workflow](https://github.com/open-telemetry/opentelemetry-python/actions/workflows/prepare-release-branch.yml). * Press the "Run workflow" button, and leave the default branch `main` selected. * Review and merge the two pull requests that it creates From 9aadc68b175680e2e97c2eb88ab4ec1c22ffd177 Mon Sep 17 00:00:00 2001 From: Trask Stalnaker Date: Tue, 10 May 2022 19:56:11 -0700 Subject: [PATCH 08/51] Remove prior prepare release script --- scripts/prepare_release.sh | 34 ---------------------------------- 1 file changed, 34 deletions(-) delete mode 100755 scripts/prepare_release.sh diff --git a/scripts/prepare_release.sh b/scripts/prepare_release.sh deleted file mode 100755 index 607b6189bb5..00000000000 --- a/scripts/prepare_release.sh +++ /dev/null @@ -1,34 +0,0 @@ -#!/bin/bash -# -# This script: -# 1. parses the version number from the branch name -# 2. updates version.py files to match that version -# 3. iterates through CHANGELOG.md files and updates any files containing -# unreleased changes -# 4. sets the output variable 'version_updated' to determine whether -# the github action to create a pull request should run. this allows -# maintainers to merge changes back into the release branch without -# triggering unnecessary pull requests -# - -VERSION=$(./scripts/eachdist.py version --mode stable)-$(./scripts/eachdist.py version --mode prerelease) -echo "Using version ${VERSION}" - - -# create the release branch -git checkout -b release/${VERSION} -git push origin release/${VERSION} - -./scripts/eachdist.py update_versions --versions stable,prerelease -rc=$? -if [ $rc != 0 ]; then - echo "::set-output name=version_updated::0" - exit 0 -fi - -git add . - -git commit -m "updating changelogs and version to ${VERSION}" - -echo "Time to create a release, here's a sample title:" -echo "[pre-release] Update changelogs, version [${VERSION}]" From c8018978b710811f2a108386c7cbf2cf1f1adb9c Mon Sep 17 00:00:00 2001 From: Trask Stalnaker Date: Tue, 10 May 2022 20:07:19 -0700 Subject: [PATCH 09/51] Add comment --- .github/workflows/merge-change-log-to-main.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/merge-change-log-to-main.yml b/.github/workflows/merge-change-log-to-main.yml index 4668d7303e9..8112e362396 100644 --- a/.github/workflows/merge-change-log-to-main.yml +++ b/.github/workflows/merge-change-log-to-main.yml @@ -27,7 +27,9 @@ jobs: body="Merge change log updates from \`$GITHUB_REF_NAME\`." branch="merge-change-log-updates-from-${GITHUB_REF_NAME//\//-}" + # perform a 3-way merge of a single file git format-patch --stdout HEAD..origin/$GITHUB_REF_NAME CHANGELOG.md | git apply --3way + git commit -a -m "$message" git push origin HEAD:$branch gh pr create --title "$message" \ From d96da9b0b8069b8144361a26384e1542fdf47f64 Mon Sep 17 00:00:00 2001 From: Trask Stalnaker Date: Tue, 10 May 2022 20:14:02 -0700 Subject: [PATCH 10/51] Remove 'Update main' section --- RELEASING.md | 9 --------- 1 file changed, 9 deletions(-) diff --git a/RELEASING.md b/RELEASING.md index 50abf3da955..0262c5983cd 100644 --- a/RELEASING.md +++ b/RELEASING.md @@ -53,7 +53,6 @@ Run the [Merge change log to main workflow](https://github.com/open-telemetry/op Release Process: - [Check PyPI](#Check-PyPI) - [Move stable tag](#Move-stable-tag) -- [Update main](#Update-main) - [Troubleshooting](#troubleshooting) ## Check PyPI @@ -78,14 +77,6 @@ git push origin stable To validate this worked, ensure the stable build has run successfully: https://readthedocs.org/projects/opentelemetry-python/builds/. If the build has not run automatically, it can be manually trigger via the readthedocs interface. -## Update main - -Ensure the version and changelog updates have been applied to main. Update the versions in eachdist.ini once again this time to include the `.dev0` tag and -run eachdist once again: -```bash -./scripts/eachdist.py update_versions --versions stable,prerelease -``` - ## Hotfix procedure A `hotfix` is defined as a small change developed to correct a bug that should be released as quickly as possible. Due to the nature of hotfixes, they usually will only affect one or a few packages. Therefore, it usually is not necessary to go through the entire release process outlined above for hotfixes. Follow the below steps how to release a hotfix: From cd0544ac4be629b7298be478a71cffb06011577f Mon Sep 17 00:00:00 2001 From: Trask Stalnaker Date: Tue, 10 May 2022 20:16:47 -0700 Subject: [PATCH 11/51] Add more detailed sub-bullet --- RELEASING.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/RELEASING.md b/RELEASING.md index 0262c5983cd..19ecf641776 100644 --- a/RELEASING.md +++ b/RELEASING.md @@ -9,6 +9,8 @@ * Press the "Run workflow" button, and leave the default branch `main` selected. * Review and merge the two pull requests that it creates (one is targeted to the release branch and one is targeted to `main`). + * These pull requests will update the release branch to the latest release versions and will bump the main branch to + the next dev version. ## Preparing a new patch release From 17c0449bd9e0ced3309a961a5b38165cdf699c54 Mon Sep 17 00:00:00 2001 From: Trask Stalnaker Date: Tue, 10 May 2022 20:23:44 -0700 Subject: [PATCH 12/51] Remove hotfix procedure --- RELEASING.md | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/RELEASING.md b/RELEASING.md index 19ecf641776..e58d8b9ed19 100644 --- a/RELEASING.md +++ b/RELEASING.md @@ -79,21 +79,6 @@ git push origin stable To validate this worked, ensure the stable build has run successfully: https://readthedocs.org/projects/opentelemetry-python/builds/. If the build has not run automatically, it can be manually trigger via the readthedocs interface. -## Hotfix procedure - -A `hotfix` is defined as a small change developed to correct a bug that should be released as quickly as possible. Due to the nature of hotfixes, they usually will only affect one or a few packages. Therefore, it usually is not necessary to go through the entire release process outlined above for hotfixes. Follow the below steps how to release a hotfix: - -1. Identify the packages that are affected by the bug. Make the changes to those packages, merging to `main`, as quickly as possible. -2. On your local machine, remove the `dev0` tags from the version number and increment the patch version number. -3. On your local machine, update `CHANGELOG.md` with the date of the hotfix change. -4. With administrator privileges for PyPi, manually publish the affected packages. - 1. Install [twine](https://pypi.org/project/twine/) and [build](https://pypi.org/project/build/) - 2. Navigate to where the `pyproject.toml` file exists for the package you want to publish. - 3. To build the package: run `python -m build`. - 4. Validate your built distributions by running `twine check dist/*`. - 5. Upload distributions to PyPi by running `twine upload dist/*`. -5. Note that since hotfixes are manually published, the build scripts for publish after creating a release are not run. - ## Troubleshooting ### Publish failed From 20318637e2f204b575bfc980ae6650ea57823afc Mon Sep 17 00:00:00 2001 From: Trask Stalnaker Date: Tue, 10 May 2022 20:30:24 -0700 Subject: [PATCH 13/51] Merge after release sections --- RELEASING.md | 71 +++++++++++++++++++++------------------------------- 1 file changed, 29 insertions(+), 42 deletions(-) diff --git a/RELEASING.md b/RELEASING.md index e58d8b9ed19..2c485b7c5ed 100644 --- a/RELEASING.md +++ b/RELEASING.md @@ -30,54 +30,41 @@ ## Making the release -Run the [Release workflow](https://github.com/open-telemetry/opentelemetry-python/actions/workflows/release.yml). - -* Press the "Run workflow" button, then select the release branch from the dropdown list, - e.g. `release/v1.9.x`, and click the "Run workflow" button below that. -* This workflow will publish the artifacts and publish a GitHub release with release notes based on the change log. +* Run the [Release workflow](https://github.com/open-telemetry/opentelemetry-python/actions/workflows/release.yml). + * Press the "Run workflow" button, then select the release branch from the dropdown list, + e.g. `release/v1.9.x`, and click the "Run workflow" button below that. + * This workflow will publish the artifacts and publish a GitHub release with release notes based on the change log. * Review and merge the pull request that the release workflow creates against the release branch which adds the release date to the change log. ## After the release -Run the [Merge change log to main workflow](https://github.com/open-telemetry/opentelemetry-python/actions/workflows/merge-change-log-to-main.yml). - -* Press the "Run workflow" button, then select the release branch from the dropdown list, - e.g. `release/v1.9.x`, and click the "Run workflow" button below that. -* This will create a pull request that merges the change log updates from the release branch - back to `main`. +* Run the [Merge change log to main workflow](https://github.com/open-telemetry/opentelemetry-python/actions/workflows/merge-change-log-to-main.yml). + * Press the "Run workflow" button, then select the release branch from the dropdown list, + e.g. `release/v1.9.x`, and click the "Run workflow" button below that. + * This will create a pull request that merges the change log updates from the release branch + back to `main`. + * Note: this workflow will fail if there have been conflicting change log updates introduced in `main`, + in which case you will need to merge the change log updates manually and send your own pull + request against `main`. * Review and merge the pull request that it creates. -* This workflow will fail if there have been conflicting change log updates introduced in `main`, - in which case you will need to merge the change log updates manually and send your own pull - request against `main`. - - -Release Process: -- [Check PyPI](#Check-PyPI) -- [Move stable tag](#Move-stable-tag) -- [Troubleshooting](#troubleshooting) - -## Check PyPI - -This should be handled automatically on release by the [publish action](https://github.com/open-telemetry/opentelemetry-python/blob/main/.github/workflows/publish.yml). - -- Check the [action logs](https://github.com/open-telemetry/opentelemetry-python/actions?query=workflow%3APublish) to make sure packages have been uploaded to PyPI -- Check the release history (e.g. https://pypi.org/project/opentelemetry-api/#history) on PyPI - -If for some reason the action failed, see [Publish failed](#publish-failed) below - -## Move stable tag - -This will ensure the docs are pointing at the stable release. - -```bash -git tag -d stable -git tag stable -git push --delete origin tagname -git push origin stable -``` - -To validate this worked, ensure the stable build has run successfully: https://readthedocs.org/projects/opentelemetry-python/builds/. If the build has not run automatically, it can be manually trigger via the readthedocs interface. +* Check PyPI + * This should be handled automatically on release by the [publish action](https://github.com/open-telemetry/opentelemetry-python/blob/main/.github/workflows/publish.yml). + * Check the [action logs](https://github.com/open-telemetry/opentelemetry-python/actions?query=workflow%3APublish) to make sure packages have been uploaded to PyPI + * Check the release history (e.g. https://pypi.org/project/opentelemetry-api/#history) on PyPI + * If for some reason the action failed, see [Publish failed](#publish-failed) below +* Move stable tag + * Run the following (TODO automate): + ```bash + git tag -d stable + git tag stable + git push --delete origin tagname + git push origin stable + ``` + * This will ensure the docs are pointing at the stable release. + * To validate this worked, ensure the stable build has run successfully: + https://readthedocs.org/projects/opentelemetry-python/builds/. + If the build has not run automatically, it can be manually trigger via the readthedocs interface. ## Troubleshooting From 07cbc829236ad89c699e47e5c8a25bf94e6cb9ec Mon Sep 17 00:00:00 2001 From: Trask Stalnaker Date: Tue, 17 May 2022 16:01:48 -0700 Subject: [PATCH 14/51] Make clear release-notes.txt is temp file --- .github/workflows/release.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 015e13c34ee..e69868a03dc 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -51,7 +51,7 @@ jobs: run: | # conditional block not indented because of the heredoc if [[ ! -z $PRIOR_COMBINED_VERSION_WHEN_PATCH ]]; then - cat > release-notes.txt << EOF + cat > /tmp/release-notes.txt << EOF This is a patch release on the previous $PRIOR_COMBINED_VERSION_WHEN_PATCH release, fixing the issue(s) below. EOF @@ -61,7 +61,7 @@ jobs: # while release notes render them as line breaks sed -n "0,/^## Version $STABLE_VERSION\/$PRERELEASE_VERSION/d;/^## Version /q;p" CHANGELOG.md \ | perl -0pe 's/(?> release-notes.txt + >> /tmp/release-notes.txt - name: Create GitHub release env: @@ -69,7 +69,7 @@ jobs: run: | gh release create --target $GITHUB_REF_NAME \ --title "Version $STABLE_VERSION/$PRERELEASE_VERSION" \ - --notes-file release-notes.txt \ + --notes-file /tmp/release-notes.txt \ --discussion-category announcements \ v$STABLE_VERSION From b4c952dadaecda423882127db7bdadbf233dd2e8 Mon Sep 17 00:00:00 2001 From: Trask Stalnaker Date: Thu, 19 May 2022 17:37:19 -0700 Subject: [PATCH 15/51] Support pre-release versions --- .../workflows/merge-change-log-to-main.yml | 6 +++ .github/workflows/prepare-patch-release.yml | 19 ++++++-- .github/workflows/prepare-release-branch.yml | 44 ++++++++++++++++--- .github/workflows/release.yml | 31 ++----------- 4 files changed, 64 insertions(+), 36 deletions(-) diff --git a/.github/workflows/merge-change-log-to-main.yml b/.github/workflows/merge-change-log-to-main.yml index 8112e362396..76e5de9be5f 100644 --- a/.github/workflows/merge-change-log-to-main.yml +++ b/.github/workflows/merge-change-log-to-main.yml @@ -6,6 +6,12 @@ jobs: create-pull-request: runs-on: ubuntu-latest steps: + - run: | + if [[ $GITHUB_REF_NAME != release/* ]]; then + echo this workflow should only be run against release branches + exit 1 + fi + - uses: actions/checkout@v3 with: # this workflow is run against the release branch (see usage of GITHUB_REF_NAME below) diff --git a/.github/workflows/prepare-patch-release.yml b/.github/workflows/prepare-patch-release.yml index b9d6765209f..d98d348ec37 100644 --- a/.github/workflows/prepare-patch-release.yml +++ b/.github/workflows/prepare-patch-release.yml @@ -6,12 +6,18 @@ jobs: prepare-patch-release: runs-on: ubuntu-latest steps: + - run: | + if [[ ! $GITHUB_REF_NAME =~ ^release/[0-9]+\.[0-9]+\.[0-9]+$ ]]; then + echo this workflow should only be run against long-term release branches + #exit 1 + fi + - uses: actions/checkout@v3 - name: Set environment variables run: | stable_version=$(./scripts/eachdist.py version --mode stable) - if [[ $stable_version =~ ([0-9]+\.[0-9]+)\.([0-9]+) ]]; then + if [[ $stable_version =~ ^([0-9]+\.[0-9]+)\.([0-9]+)$ ]]; then stable_major_minor="${BASH_REMATCH[1]}" stable_patch="${BASH_REMATCH[2]}" else @@ -20,7 +26,7 @@ jobs: fi prerelease_version=$(./scripts/eachdist.py version --mode prerelease) - if [[ $prerelease_version =~ 0\.([0-9]+)b([0-9]+) ]]; then + if [[ $prerelease_version =~ ^0\.([0-9]+)b([0-9]+)$ ]]; then prerelease_minor="${BASH_REMATCH[1]}" prerelease_patch="${BASH_REMATCH[2]}" else @@ -31,13 +37,20 @@ jobs: echo "STABLE_VERSION=$stable_major_minor.$((stable_patch + 1))" >> $GITHUB_ENV echo "PRERELEASE_VERSION=0.${prerelease_minor}b$((prerelease_patch + 1))" >> $GITHUB_ENV + - name: Check change log has been updated + run: | + if ! grep --quiet "^## Version $STABLE_VERSION " CHANGELOG.md; then + echo the change log needs to be updated + exit 1 + fi + - name: Update version run: .github/scripts/update-version.sh $STABLE_VERSION $PRERELEASE_VERSION - name: Set git user run: .github/scripts/set-git-user.sh - - name: Create pull request against the release branch + - name: Create pull request env: # not using the default GITHUB_TOKEN because pull requests generated by it do not run any workflows GITHUB_TOKEN: ${{ secrets.BOT_TOKEN }} diff --git a/.github/workflows/prepare-release-branch.yml b/.github/workflows/prepare-release-branch.yml index c9bc4232d3e..d3e6c893101 100644 --- a/.github/workflows/prepare-release-branch.yml +++ b/.github/workflows/prepare-release-branch.yml @@ -3,8 +3,22 @@ on: workflow_dispatch: jobs: + prereqs: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + + - run: | + version=$(.github/scripts/get-version.sh) + version=${version//-dev/} + if ! grep --quiet "^## Version $version " CHANGELOG.md; then + echo the change log needs to be updated + exit 1 + fi + create-pull-request-against-release-branch: runs-on: ubuntu-latest + needs: prereqs steps: - uses: actions/checkout@v3 @@ -17,7 +31,16 @@ jobs: prerelease_version=$(./scripts/eachdist.py version --mode prerelease) prerelease_version=${prerelease_version//-dev/} - stable_version_branch_part=$(echo $stable_version | sed -E 's/([0-9]+)\.([0-9]+)\.0/\1.\2.x/') + if [[ $stable_version =~ ^([0-9]+)\.([0-9]+)\.0$ ]]; then + stable_version_branch_part=$(echo $stable_version | sed -E 's/([0-9]+)\.([0-9]+)\.0/\1.\2.x/') + elif [[ $stable_version =~ ^([0-9]+)\.([0-9]+)\.0 ]]; then + # pre-release version, e.g. 1.9.0rc + stable_version_branch_part="release/v$stable_version" + else + echo "unexpected version: $version" + exit 1 + fi + prerelease_version_branch_part=$(echo $prerelease_version | sed -E 's/0\.([0-9]+)b0/0.\1bx/') release_branch_name="release/v${stable_version_branch_part}-${prerelease_version_branch_part}" @@ -30,6 +53,11 @@ jobs: - name: Update version run: .github/scripts/update-version.sh $STABLE_VERSION $PRERELEASE_VERSION + - name: Update the change log with the approximate release date + run: | + date=$(date "+%Y-%m-%d") + sed -Ei "s/## Version $STABLE_VERSION\/$PRERELEASE_VERSION .*/## Version $STABLE_VERSION\/$PRERELEASE_VERSION ($date)/" CHANGELOG.md + - name: Set git user run: .github/scripts/set-git-user.sh @@ -57,9 +85,15 @@ jobs: run: | stable_version=$(./scripts/eachdist.py version --mode stable) stable_version=${stable_version//-dev/} - if [[ $stable_version =~ ([0-9]+)\.([0-9]+)\.[0-9]+ ]]; then - stable_major="${BASH_REMATCH[1]}" - stable_minor="${BASH_REMATCH[2]}" + if [[ $stable_version =~ ^([0-9]+)\.([0-9]+)\.0-dev$ ]]; then + major="${BASH_REMATCH[1]}" + minor="${BASH_REMATCH[2]}" + next_version="$major.$((minor + 1)).0" + elif [[ $stable_version =~ ^([0-9]+)\.([0-9]+)\.0 ]]; then + # pre-release version, e.g. 1.9.0rc + major="${BASH_REMATCH[1]}" + minor="${BASH_REMATCH[2]}" + next_version="$major.$minor.0" else echo "unexpected stable_version: $stable_version" exit 1 @@ -67,7 +101,7 @@ jobs: prerelease_version=$(./scripts/eachdist.py version --mode prerelease) prerelease_version=${prerelease_version//-dev/} - if [[ $prerelease_version =~ 0\.([0-9]+)b[0-9]+ ]]; then + if [[ $prerelease_version =~ ^0\.([0-9]+)b[0-9]+$ ]]; then prerelease_minor="${BASH_REMATCH[1]}" else echo "unexpected prerelease_version: $prerelease_version" diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index e69868a03dc..78d5d08af07 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -8,7 +8,7 @@ jobs: steps: - run: | if [[ $GITHUB_REF_NAME != release/* ]]; then - echo the release workflow should only be run against release branches + echo this workflow should only be run against release branches exit 1 fi @@ -19,7 +19,7 @@ jobs: stable_version=$(./scripts/eachdist.py version --mode stable) prerelease_version=$(./scripts/eachdist.py version --mode prerelease) - if [[ $stable_version =~ ([0-9]+)\.([0-9]+)\.([0-9]+) ]]; then + if [[ $stable_version =~ ^([0-9]+)\.([0-9]+)\.([0-9]+) ]]; then stable_major="${BASH_REMATCH[1]}" stable_minor="${BASH_REMATCH[2]}" stable_patch="${BASH_REMATCH[3]}" @@ -28,7 +28,7 @@ jobs: exit 1 fi if [[ $stable_patch != 0 ]]; then - if [[ $prerelease_version =~ 0\.([0-9]+)b([0-9]+) ]]; then + if [[ $prerelease_version =~ ^0\.([0-9]+)b([0-9]+)$ ]]; then prerelease_minor="${BASH_REMATCH[1]}" prerelease_patch="${BASH_REMATCH[2]}" else @@ -72,28 +72,3 @@ jobs: --notes-file /tmp/release-notes.txt \ --discussion-category announcements \ v$STABLE_VERSION - - - name: Update the change log with the release date - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - run: | - date=$(gh release view v$STABLE_VERSION --json publishedAt --jq .publishedAt | sed 's/T.*//') - sed -Ei "s/## Version $STABLE_VERSION\/$PRERELEASE_VERSION .*/## Version $STABLE_VERSION\/$PRERELEASE_VERSION ($date)/" CHANGELOG.md - - - name: Set git user - run: .github/scripts/set-git-user.sh - - - name: Create pull request against the release branch - env: - # not using the default GITHUB_TOKEN because pull requests generated by it do not run any workflows - GITHUB_TOKEN: ${{ secrets.BOT_TOKEN }} - run: | - message="Add the release date for ${STABLE_VERSION}/${PRERELEASE_VERSION} to the change log" - branch="add-release-date-for-${STABLE_VERSION}-${PRERELEASE_VERSION}" - - git commit -a -m "$message" - git push origin HEAD:$branch - gh pr create --title "[$GITHUB_REF_NAME] $message" \ - --body "$message." \ - --head $branch \ - --base $GITHUB_REF_NAME From 59524518b707c8051a86a6a79fa161a996216692 Mon Sep 17 00:00:00 2001 From: Trask Stalnaker Date: Thu, 19 May 2022 17:42:36 -0700 Subject: [PATCH 16/51] Update date on prepare patch release too --- .github/workflows/prepare-patch-release.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/prepare-patch-release.yml b/.github/workflows/prepare-patch-release.yml index d98d348ec37..c7b19eae88b 100644 --- a/.github/workflows/prepare-patch-release.yml +++ b/.github/workflows/prepare-patch-release.yml @@ -47,6 +47,11 @@ jobs: - name: Update version run: .github/scripts/update-version.sh $STABLE_VERSION $PRERELEASE_VERSION + - name: Update the change log with the approximate release date + run: | + date=$(date "+%Y-%m-%d") + sed -Ei "s/## Version $VERSION .*/## Version $VERSION ($date)/" CHANGELOG.md + - name: Set git user run: .github/scripts/set-git-user.sh From bcfbfb81e908af561e1a0eacda635d9506904ed3 Mon Sep 17 00:00:00 2001 From: Trask Stalnaker Date: Wed, 25 May 2022 19:04:37 -0700 Subject: [PATCH 17/51] Add check to make sure release branch is selected --- .github/workflows/backport.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/backport.yml b/.github/workflows/backport.yml index 31c73b755cc..37fce02e6b3 100644 --- a/.github/workflows/backport.yml +++ b/.github/workflows/backport.yml @@ -10,6 +10,12 @@ jobs: backport: runs-on: ubuntu-latest steps: + - run: | + if [[ ! $GITHUB_REF_NAME =~ ^release/v[0-9]+\.[0-9]+\.x-0\.[0-9]+bx$ ]]; then + echo this workflow should only be run against long-term release branches + exit 1 + fi + - uses: actions/checkout@v3 with: # history is needed to run git cherry-pick below From 0d033059ef5feb1ce3bccd990179263629c9b60f Mon Sep 17 00:00:00 2001 From: Trask Stalnaker Date: Wed, 25 May 2022 19:05:22 -0700 Subject: [PATCH 18/51] Remove unused code --- .github/workflows/backport.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/backport.yml b/.github/workflows/backport.yml index 37fce02e6b3..42b4262b46e 100644 --- a/.github/workflows/backport.yml +++ b/.github/workflows/backport.yml @@ -32,7 +32,6 @@ jobs: run: | commit=$(gh pr view $NUMBER --json mergeCommit --jq .mergeCommit.oid) title=$(gh pr view $NUMBER --json title --jq .title) - url=$(gh pr view $NUMBER --json url --jq .url) branch="backport-${NUMBER}-to-${GITHUB_REF_NAME//\//-}" From 9f8b0b0c9e61259e501afa06733ef3c0c2896286 Mon Sep 17 00:00:00 2001 From: Trask Stalnaker Date: Sat, 4 Jun 2022 17:10:29 -0700 Subject: [PATCH 19/51] Simplify change log management --- .../workflows/merge-change-log-to-main.yml | 44 ------------------- .github/workflows/release.yml | 22 ++++++++++ RELEASING.md | 19 ++------ 3 files changed, 25 insertions(+), 60 deletions(-) delete mode 100644 .github/workflows/merge-change-log-to-main.yml diff --git a/.github/workflows/merge-change-log-to-main.yml b/.github/workflows/merge-change-log-to-main.yml deleted file mode 100644 index 76e5de9be5f..00000000000 --- a/.github/workflows/merge-change-log-to-main.yml +++ /dev/null @@ -1,44 +0,0 @@ -name: Merge change log to main -on: - workflow_dispatch: - -jobs: - create-pull-request: - runs-on: ubuntu-latest - steps: - - run: | - if [[ $GITHUB_REF_NAME != release/* ]]; then - echo this workflow should only be run against release branches - exit 1 - fi - - - uses: actions/checkout@v3 - with: - # this workflow is run against the release branch (see usage of GITHUB_REF_NAME below) - # but it is creating a pull request against main - ref: main - # history is needed to run format-patch below - fetch-depth: 0 - - - name: Set git user - run: .github/scripts/set-git-user.sh - - # this will fail if there have been conflicting change log updates introduced in main - - name: Create pull request against main - env: - # not using the default GITHUB_TOKEN because pull requests generated by it do not run any workflows - GITHUB_TOKEN: ${{ secrets.BOT_TOKEN }} - run: | - message="Merge change log updates from $GITHUB_REF_NAME" - body="Merge change log updates from \`$GITHUB_REF_NAME\`." - branch="merge-change-log-updates-from-${GITHUB_REF_NAME//\//-}" - - # perform a 3-way merge of a single file - git format-patch --stdout HEAD..origin/$GITHUB_REF_NAME CHANGELOG.md | git apply --3way - - git commit -a -m "$message" - git push origin HEAD:$branch - gh pr create --title "$message" \ - --body "$body" \ - --head $branch \ - --base main diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 78d5d08af07..4011d0ea0d4 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -72,3 +72,25 @@ jobs: --notes-file /tmp/release-notes.txt \ --discussion-category announcements \ v$STABLE_VERSION + + - name: Set git user + run: .github/scripts/set-git-user.sh + + - name: Create pull request against main + env: + # not using the default GITHUB_TOKEN because pull requests generated by it do not run any workflows + GITHUB_TOKEN: ${{ secrets.BOT_TOKEN }} + run: | + message="Copy change log updates from $GITHUB_REF_NAME" + body="Copy log updates from \`$GITHUB_REF_NAME\`." + branch="copy-change-log-updates-from-${GITHUB_REF_NAME//\//-}" + + # perform a smart copy of the change log entries for the given release to main + # TODO (trask) + + git commit -a -m "$message" + git push origin HEAD:$branch + gh pr create --title "$message" \ + --body "$body" \ + --head $branch \ + --base main diff --git a/RELEASING.md b/RELEASING.md index 2c485b7c5ed..a91a92d7745 100644 --- a/RELEASING.md +++ b/RELEASING.md @@ -7,10 +7,7 @@ `## Version 1.9.0 (unreleased)`. * Run the [Prepare release branch workflow](https://github.com/open-telemetry/opentelemetry-python/actions/workflows/prepare-release-branch.yml). * Press the "Run workflow" button, and leave the default branch `main` selected. -* Review and merge the two pull requests that it creates - (one is targeted to the release branch and one is targeted to `main`). - * These pull requests will update the release branch to the latest release versions and will bump the main branch to - the next dev version. + * Review and merge the pull requests that it creates for updating the version on both the release branch and main. ## Preparing a new patch release @@ -26,7 +23,7 @@ * Run the [Prepare patch release workflow](https://github.com/open-telemetry/opentelemetry-python/actions/workflows/prepare-patch-release.yml). * Press the "Run workflow" button, then select the release branch from the dropdown list, e.g. `release/v1.9.x`, and click the "Run workflow" button below that. -* Review and merge the pull request that it creates. + * Review and merge the pull request that it creates for updating the version on the release branch. ## Making the release @@ -34,20 +31,10 @@ * Press the "Run workflow" button, then select the release branch from the dropdown list, e.g. `release/v1.9.x`, and click the "Run workflow" button below that. * This workflow will publish the artifacts and publish a GitHub release with release notes based on the change log. -* Review and merge the pull request that the release workflow creates against the release branch - which adds the release date to the change log. + * Review and merge the pull request that it creates for updating the change log in main. ## After the release -* Run the [Merge change log to main workflow](https://github.com/open-telemetry/opentelemetry-python/actions/workflows/merge-change-log-to-main.yml). - * Press the "Run workflow" button, then select the release branch from the dropdown list, - e.g. `release/v1.9.x`, and click the "Run workflow" button below that. - * This will create a pull request that merges the change log updates from the release branch - back to `main`. - * Note: this workflow will fail if there have been conflicting change log updates introduced in `main`, - in which case you will need to merge the change log updates manually and send your own pull - request against `main`. -* Review and merge the pull request that it creates. * Check PyPI * This should be handled automatically on release by the [publish action](https://github.com/open-telemetry/opentelemetry-python/blob/main/.github/workflows/publish.yml). * Check the [action logs](https://github.com/open-telemetry/opentelemetry-python/actions?query=workflow%3APublish) to make sure packages have been uploaded to PyPI From 350be4f223793a18d6ac14eebc909afcd4978b37 Mon Sep 17 00:00:00 2001 From: Trask Stalnaker Date: Mon, 6 Jun 2022 12:46:57 -0700 Subject: [PATCH 20/51] Comment improvement --- .github/workflows/backport.yml | 2 +- .github/workflows/prepare-patch-release.yml | 2 +- .github/workflows/prepare-release-branch.yml | 4 ++-- .github/workflows/release.yml | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/backport.yml b/.github/workflows/backport.yml index 42b4262b46e..038d48afb29 100644 --- a/.github/workflows/backport.yml +++ b/.github/workflows/backport.yml @@ -27,7 +27,7 @@ jobs: - name: Create pull request env: NUMBER: ${{ github.event.inputs.number }} - # not using the default GITHUB_TOKEN because pull requests generated by it do not run any workflows + # not using secrets.GITHUB_TOKEN since pull requests from that token do not run workflows GITHUB_TOKEN: ${{ secrets.BOT_TOKEN }} run: | commit=$(gh pr view $NUMBER --json mergeCommit --jq .mergeCommit.oid) diff --git a/.github/workflows/prepare-patch-release.yml b/.github/workflows/prepare-patch-release.yml index c7b19eae88b..d7f2d83daa7 100644 --- a/.github/workflows/prepare-patch-release.yml +++ b/.github/workflows/prepare-patch-release.yml @@ -57,7 +57,7 @@ jobs: - name: Create pull request env: - # not using the default GITHUB_TOKEN because pull requests generated by it do not run any workflows + # not using secrets.GITHUB_TOKEN since pull requests from that token do not run workflows GITHUB_TOKEN: ${{ secrets.BOT_TOKEN }} run: | message="Prepare release ${STABLE_VERSION}/${PRERELEASE_VERSION}" diff --git a/.github/workflows/prepare-release-branch.yml b/.github/workflows/prepare-release-branch.yml index d3e6c893101..b0fe71867cb 100644 --- a/.github/workflows/prepare-release-branch.yml +++ b/.github/workflows/prepare-release-branch.yml @@ -63,7 +63,7 @@ jobs: - name: Create pull request against the release branch env: - # not using the default GITHUB_TOKEN because pull requests generated by it do not run any workflows + # not using secrets.GITHUB_TOKEN since pull requests from that token do not run workflows GITHUB_TOKEN: ${{ secrets.BOT_TOKEN }} run: | message="Prepare release ${STABLE_VERSION}/${PRERELEASE_VERSION}" @@ -119,7 +119,7 @@ jobs: - name: Create pull request against main env: - # not using the default GITHUB_TOKEN because pull requests generated by it do not run any workflows + # not using secrets.GITHUB_TOKEN since pull requests from that token do not run workflows GITHUB_TOKEN: ${{ secrets.BOT_TOKEN }} run: | message="Update version to ${NEXT_STABLE_VERSION}/${NEXT_PRERELEASE_VERSION}" diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 4011d0ea0d4..2c2cc9b27f3 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -78,7 +78,7 @@ jobs: - name: Create pull request against main env: - # not using the default GITHUB_TOKEN because pull requests generated by it do not run any workflows + # not using secrets.GITHUB_TOKEN since pull requests from that token do not run workflows GITHUB_TOKEN: ${{ secrets.BOT_TOKEN }} run: | message="Copy change log updates from $GITHUB_REF_NAME" From 443290038c048a9ea3308056c47efce6163081d1 Mon Sep 17 00:00:00 2001 From: Trask Stalnaker Date: Mon, 6 Jun 2022 13:03:08 -0700 Subject: [PATCH 21/51] Better change log handling --- .github/workflows/prepare-patch-release.yml | 25 +++-- .github/workflows/prepare-release-branch.yml | 27 ++++-- .github/workflows/release.yml | 96 ++++++++++++++++++-- 3 files changed, 118 insertions(+), 30 deletions(-) diff --git a/.github/workflows/prepare-patch-release.yml b/.github/workflows/prepare-patch-release.yml index d7f2d83daa7..2c43b0b5b17 100644 --- a/.github/workflows/prepare-patch-release.yml +++ b/.github/workflows/prepare-patch-release.yml @@ -6,13 +6,18 @@ jobs: prepare-patch-release: runs-on: ubuntu-latest steps: + - uses: actions/checkout@v3 + - run: | - if [[ ! $GITHUB_REF_NAME =~ ^release/[0-9]+\.[0-9]+\.[0-9]+$ ]]; then + if [[ ! $GITHUB_REF_NAME =~ ^release/v[0-9]+\.[0-9]+\.x-0\.[0-9]+bx$ ]]; then echo this workflow should only be run against long-term release branches - #exit 1 + exit 1 fi - - uses: actions/checkout@v3 + if ! grep --quiet "^## Unreleased$" CHANGELOG.md; then + echo the change log is missing an \"Unreleased\" section + exit 1 + fi - name: Set environment variables run: | @@ -36,13 +41,7 @@ jobs: echo "STABLE_VERSION=$stable_major_minor.$((stable_patch + 1))" >> $GITHUB_ENV echo "PRERELEASE_VERSION=0.${prerelease_minor}b$((prerelease_patch + 1))" >> $GITHUB_ENV - - - name: Check change log has been updated - run: | - if ! grep --quiet "^## Version $STABLE_VERSION " CHANGELOG.md; then - echo the change log needs to be updated - exit 1 - fi + echo "VERSION=${STABLE_VERSION}/${PRERELEASE_VERSION}" >> $GITHUB_ENV - name: Update version run: .github/scripts/update-version.sh $STABLE_VERSION $PRERELEASE_VERSION @@ -50,7 +49,7 @@ jobs: - name: Update the change log with the approximate release date run: | date=$(date "+%Y-%m-%d") - sed -Ei "s/## Version $VERSION .*/## Version $VERSION ($date)/" CHANGELOG.md + sed -Ei "s/^## Unreleased$/## Version $VERSION ($date)/" CHANGELOG.md - name: Set git user run: .github/scripts/set-git-user.sh @@ -60,8 +59,8 @@ jobs: # not using secrets.GITHUB_TOKEN since pull requests from that token do not run workflows GITHUB_TOKEN: ${{ secrets.BOT_TOKEN }} run: | - message="Prepare release ${STABLE_VERSION}/${PRERELEASE_VERSION}" - branch="prepare-release-${STABLE_VERSION}-${PRERELEASE_VERSION}" + message="Prepare release ${VERSION}" + branch="prepare-release-${VERSION/\//-}" git commit -a -m "$message" git push origin HEAD:$branch diff --git a/.github/workflows/prepare-release-branch.yml b/.github/workflows/prepare-release-branch.yml index b0fe71867cb..56c8544ea1c 100644 --- a/.github/workflows/prepare-release-branch.yml +++ b/.github/workflows/prepare-release-branch.yml @@ -9,10 +9,13 @@ jobs: - uses: actions/checkout@v3 - run: | - version=$(.github/scripts/get-version.sh) - version=${version//-dev/} - if ! grep --quiet "^## Version $version " CHANGELOG.md; then - echo the change log needs to be updated + if [[ $GITHUB_REF_NAME != main ]]; then + echo this workflow should only be run against main + exit 1 + fi + + if ! grep --quiet "^## Unreleased$" CHANGELOG.md; then + echo the change log is missing an \"Unreleased\" section exit 1 fi @@ -56,7 +59,7 @@ jobs: - name: Update the change log with the approximate release date run: | date=$(date "+%Y-%m-%d") - sed -Ei "s/## Version $STABLE_VERSION\/$PRERELEASE_VERSION .*/## Version $STABLE_VERSION\/$PRERELEASE_VERSION ($date)/" CHANGELOG.md + sed -Ei "s/^## Unreleased$/## Version $STABLE_VERSION\/$PRERELEASE_VERSION ($date)/" CHANGELOG.md - name: Set git user run: .github/scripts/set-git-user.sh @@ -78,6 +81,7 @@ jobs: create-pull-request-against-main: runs-on: ubuntu-latest + needs: prereqs steps: - uses: actions/checkout@v3 @@ -110,10 +114,17 @@ jobs: echo "NEXT_STABLE_VERSION=$stable_major.$((stable_minor + 1)).0-dev" >> $GITHUB_ENV echo "NEXT_PRERELEASE_VERSION=0.$((prerelease_minor + 1))b0-dev" >> $GITHUB_ENV + echo "NEXT_VERSION=${NEXT_STABLE_VERSION}/${NEXT_PRERELEASE_VERSION}" >> $GITHUB_ENV - name: Update version run: .github/scripts/update-version.sh $NEXT_STABLE_VERSION $NEXT_PRERELEASE_VERSION + - name: Update the change log on main + run: | + # the actual release date on main will be updated at the end of the release workflow + date=$(date "+%Y-%m-%d") + sed -Ei "s/^## Unreleased$/## Unreleased\n\n## Version $VERSION ($date)/" CHANGELOG.md + - name: Set git user run: .github/scripts/set-git-user.sh @@ -122,9 +133,9 @@ jobs: # not using secrets.GITHUB_TOKEN since pull requests from that token do not run workflows GITHUB_TOKEN: ${{ secrets.BOT_TOKEN }} run: | - message="Update version to ${NEXT_STABLE_VERSION}/${NEXT_PRERELEASE_VERSION}" - body="Update version to \`${NEXT_STABLE_VERSION}/${NEXT_PRERELEASE_VERSION}\`." - branch="update-version-to-${NEXT_STABLE_VERSION}-${NEXT_PRERELEASE_VERSION}" + message="Update version to ${NEXT_VERSION}" + body="Update version to \`${NEXT_VERSION}\`." + branch="update-version-to-${NEXT_VERSION/\//-}" git commit -a -m "$message" git push origin HEAD:$branch diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 2c2cc9b27f3..60910c9692e 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -36,31 +36,54 @@ jobs: exit 1 fi if [[ $prerelease_patch != 0 ]]; then - prior_combined_version_when_patch="$stable_major.$stable_minor.$((stable_patch - 1))/0.${prerelease_minor}b$((prerelease_patch - 1))" + prior_version_when_patch="$stable_major.$stable_minor.$((stable_patch - 1))/0.${prerelease_minor}b$((prerelease_patch - 1))" fi fi echo "STABLE_VERSION=$stable_version" >> $GITHUB_ENV echo "PRERELEASE_VERSION=$prerelease_version" >> $GITHUB_ENV + echo "VERSION=${STABLE_VERSION}/${PRERELEASE_VERSION}" >> $GITHUB_ENV - echo "PRIOR_COMBINED_VERSION_WHEN_PATCH=$prior_combined_version_when_patch" >> $GITHUB_ENV + echo "PRIOR_VERSION_WHEN_PATCH=$prior_version_when_patch" >> $GITHUB_ENV + + # check out main branch to verify there won't be problems with merging the change log + # at the end of this workflow + - uses: actions/checkout@v3 + with: + ref: main + + - run: | + if [[ -z $PRIOR_VERSION_WHEN_PATCH ]]; then + # not making a patch release + if ! grep --quiet "^## Version $VERSION " CHANGELOG.md; then + echo the pull request generated by prepare-release-branch.yml needs to be merged first + exit 1 + fi + fi + + # back to the release branch + - uses: actions/checkout@v3 - name: Generate release notes env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | # conditional block not indented because of the heredoc - if [[ ! -z $PRIOR_COMBINED_VERSION_WHEN_PATCH ]]; then + if [[ ! -z $PRIOR_VERSION_WHEN_PATCH ]]; then cat > /tmp/release-notes.txt << EOF - This is a patch release on the previous $PRIOR_COMBINED_VERSION_WHEN_PATCH release, fixing the issue(s) below. + This is a patch release on the previous $PRIOR_VERSION_WHEN_PATCH release, fixing the issue(s) below. EOF fi + # CHANGELOG_SECTION.md is also used at the end of the release workflow + # for copying the change log updates to main + sed -n "0,/^## Version $VERSION /d;/^## Version /q;p" CHANGELOG.md \ + > /tmp/CHANGELOG_SECTION.md + # the complex perl regex is needed because markdown docs render newlines as soft wraps # while release notes render them as line breaks - sed -n "0,/^## Version $STABLE_VERSION\/$PRERELEASE_VERSION/d;/^## Version /q;p" CHANGELOG.md \ - | perl -0pe 's/(?> /tmp/release-notes.txt - name: Create GitHub release @@ -68,11 +91,62 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | gh release create --target $GITHUB_REF_NAME \ - --title "Version $STABLE_VERSION/$PRERELEASE_VERSION" \ + --title "Version $VERSION" \ --notes-file /tmp/release-notes.txt \ --discussion-category announcements \ v$STABLE_VERSION + - uses: actions/checkout@v3 + with: + # the step below is creating a pull request against main + ref: main + + - name: Copy change log updates to main + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + if [[ -z $PRIOR_VERSION_WHEN_PATCH ]]; then + # this was not a patch release, so the version exists already in the CHANGELOG.md + + # update the release date + date=$(gh release view v$VERSION --json publishedAt --jq .publishedAt | sed 's/T.*//') + sed -Ei "s/## Version $VERSION .*/## Version $VERSION ($date)/" CHANGELOG.md + + # the entries are copied over from the release branch to support workflows + # where change log entries may be updated after preparing the release branch + + # copy the portion above the release, up to and including the heading + sed -n "0,/^## Version $VERSION ($date)/p" CHANGELOG.md > /tmp/CHANGELOG.md + + # copy the release notes + cat /tmp/CHANGELOG_SECTION.md >> /tmp/CHANGELOG.md + + # copy the portion below the release + sed -n "0,/^## Version $VERSION /d;0,/^## Version /{/^## Version/!d};p" CHANGELOG.md \ + >> /tmp/CHANGELOG.md + + # update the real CHANGELOG.md + cp /tmp/CHANGELOG.md CHANGELOG.md + else + # this was a patch release, so the version does not exist already in the CHANGELOG.md + + # copy the portion above the top-most release, not including the heading + sed -n "0,/^## Version /{ /^## Version /!p }" CHANGELOG.md > /tmp/CHANGELOG.md + + # add the heading + date=$(gh release view v$VERSION --json publishedAt --jq .publishedAt | sed 's/T.*//') + echo "## Version $VERSION ($date)" >> /tmp/CHANGELOG.md + + # copy the release notes + cat /tmp/CHANGELOG_SECTION.md >> /tmp/CHANGELOG.md + + # copy the portion starting from the top-most release + sed -n "/^## Version /,\$p" CHANGELOG.md >> /tmp/CHANGELOG.md + + # update the real CHANGELOG.md + cp /tmp/CHANGELOG.md CHANGELOG.md + fi + - name: Set git user run: .github/scripts/set-git-user.sh @@ -85,8 +159,12 @@ jobs: body="Copy log updates from \`$GITHUB_REF_NAME\`." branch="copy-change-log-updates-from-${GITHUB_REF_NAME//\//-}" - # perform a smart copy of the change log entries for the given release to main - # TODO (trask) + if [[ -z $PRIOR_VERSION_WHEN_PATCH ]]; then + if git diff --quiet; then + echo there are no updates needed to the change log on main, not creating pull request + exit 0 # success + fi + fi git commit -a -m "$message" git push origin HEAD:$branch From 2c6a8ed99effbab23d43a11184ee059ebe438ed1 Mon Sep 17 00:00:00 2001 From: Trask Stalnaker Date: Mon, 6 Jun 2022 13:07:02 -0700 Subject: [PATCH 22/51] Update doc --- RELEASING.md | 32 +++++++++++++++++++++----------- 1 file changed, 21 insertions(+), 11 deletions(-) diff --git a/RELEASING.md b/RELEASING.md index a91a92d7745..5d1d3d42680 100644 --- a/RELEASING.md +++ b/RELEASING.md @@ -2,28 +2,25 @@ ## Preparing a new major or minor release -* Merge a pull request to `main` updating the `CHANGELOG.md`. - * The heading for the release should include the release version but not the release date, e.g. - `## Version 1.9.0 (unreleased)`. -* Run the [Prepare release branch workflow](https://github.com/open-telemetry/opentelemetry-python/actions/workflows/prepare-release-branch.yml). +* Run the [Prepare release branch workflow](https://github.com/trask/repository-template/actions/workflows/prepare-release-branch.yml). * Press the "Run workflow" button, and leave the default branch `main` selected. - * Review and merge the pull requests that it creates for updating the version on both the release branch and main. + * Review and merge the two pull requests that it creates + (one is targeted to the release branch and one is targeted to `main`). ## Preparing a new patch release * Backport pull request(s) to the release branch. - * Run the [Backport workflow](https://github.com/open-telemetry/opentelemetry-python/actions/workflows/backport.yml). + * Run the [Backport workflow](https://github.com/trask/repository-template/actions/workflows/backport.yml). * Press the "Run workflow" button, then select the release branch from the dropdown list, e.g. `release/v1.9.x`, then enter the pull request number that you want to backport, then click the "Run workflow" button below that. * Review and merge the backport pull request that it generates. * Merge a pull request to the release branch updating the `CHANGELOG.md`. - * The heading for the release should include the release version but not the release date, e.g. - `## Version 1.9.1 (Unreleased)`. -* Run the [Prepare patch release workflow](https://github.com/open-telemetry/opentelemetry-python/actions/workflows/prepare-patch-release.yml). + * The heading for the unreleased entries should be `## Unreleased`. +* Run the [Prepare patch release workflow](https://github.com/trask/repository-template/actions/workflows/prepare-patch-release.yml). * Press the "Run workflow" button, then select the release branch from the dropdown list, e.g. `release/v1.9.x`, and click the "Run workflow" button below that. - * Review and merge the pull request that it creates for updating the version on the release branch. + * Review and merge the pull request that it creates for updating the version. ## Making the release @@ -31,7 +28,20 @@ * Press the "Run workflow" button, then select the release branch from the dropdown list, e.g. `release/v1.9.x`, and click the "Run workflow" button below that. * This workflow will publish the artifacts and publish a GitHub release with release notes based on the change log. - * Review and merge the pull request that it creates for updating the change log in main. + * Review and merge the pull request that it creates for updating the change log in main + (note that if this is not a patch release then the change log on main may already be up-to-date, + in which case no pull request will be created). + +## Notes about "pre-releases" + +* Pre-release versions (e.g. `1.9.0rc1`) are supported, and will cause a "short-term" release branch to be created + based on the full version name (e.g. `release/v1.9.0rc1` instead of a "long-term" release branch name like + `release/v1.9.x`). +* Patch releases are not supported on short-term release branches. +* The version in `main` in this case will be bumped to the release version (e.g. `1.9.0-dev`). +* To make a second pre-release version, manually update the version in `main` + (e.g. update it from `1.9.0-dev` to `1.9.0rc2-dev`) + before running the prepare release branch workflow for that release. ## After the release From 098c216c1304aae163fa3d9294567afb2be8ccd2 Mon Sep 17 00:00:00 2001 From: Trask Stalnaker Date: Mon, 6 Jun 2022 13:24:45 -0700 Subject: [PATCH 23/51] Fixes --- .github/workflows/prepare-patch-release.yml | 9 +++-- .github/workflows/prepare-release-branch.yml | 38 +++++++++++--------- .github/workflows/release.yml | 2 +- 3 files changed, 28 insertions(+), 21 deletions(-) diff --git a/.github/workflows/prepare-patch-release.yml b/.github/workflows/prepare-patch-release.yml index 2c43b0b5b17..b308eb03231 100644 --- a/.github/workflows/prepare-patch-release.yml +++ b/.github/workflows/prepare-patch-release.yml @@ -39,9 +39,12 @@ jobs: exit 1 fi - echo "STABLE_VERSION=$stable_major_minor.$((stable_patch + 1))" >> $GITHUB_ENV - echo "PRERELEASE_VERSION=0.${prerelease_minor}b$((prerelease_patch + 1))" >> $GITHUB_ENV - echo "VERSION=${STABLE_VERSION}/${PRERELEASE_VERSION}" >> $GITHUB_ENV + stable_version="$stable_major_minor.$((stable_patch + 1))" + prerelease_version="0.${prerelease_minor}b$((prerelease_patch + 1))" + + echo "STABLE_VERSION=$stable_version" >> $GITHUB_ENV + echo "PRERELEASE_VERSION=$prerelease_version" >> $GITHUB_ENV + echo "VERSION=${stable_version}/${prerelease_version}" >> $GITHUB_ENV - name: Update version run: .github/scripts/update-version.sh $STABLE_VERSION $PRERELEASE_VERSION diff --git a/.github/workflows/prepare-release-branch.yml b/.github/workflows/prepare-release-branch.yml index 56c8544ea1c..31e60ee37c9 100644 --- a/.github/workflows/prepare-release-branch.yml +++ b/.github/workflows/prepare-release-branch.yml @@ -36,21 +36,21 @@ jobs: if [[ $stable_version =~ ^([0-9]+)\.([0-9]+)\.0$ ]]; then stable_version_branch_part=$(echo $stable_version | sed -E 's/([0-9]+)\.([0-9]+)\.0/\1.\2.x/') + prerelease_version_branch_part=$(echo $prerelease_version | sed -E 's/0\.([0-9]+)b0/0.\1bx/') + release_branch_name="release/v${stable_version_branch_part}-${prerelease_version_branch_part}" elif [[ $stable_version =~ ^([0-9]+)\.([0-9]+)\.0 ]]; then # pre-release version, e.g. 1.9.0rc - stable_version_branch_part="release/v$stable_version" + release_branch_name="release/v$stable_version-$prerelease_version" else - echo "unexpected version: $version" + echo "unexpected version: $stable_version" exit 1 fi - prerelease_version_branch_part=$(echo $prerelease_version | sed -E 's/0\.([0-9]+)b0/0.\1bx/') - release_branch_name="release/v${stable_version_branch_part}-${prerelease_version_branch_part}" - git push origin HEAD:$release_branch_name echo "STABLE_VERSION=$stable_version" >> $GITHUB_ENV echo "PRERELEASE_VERSION=$prerelease_version" >> $GITHUB_ENV + echo "VERSION=${stable_version}/${prerelease_version}" >> $GITHUB_ENV echo "RELEASE_BRANCH_NAME=$release_branch_name" >> $GITHUB_ENV - name: Update version @@ -59,7 +59,7 @@ jobs: - name: Update the change log with the approximate release date run: | date=$(date "+%Y-%m-%d") - sed -Ei "s/^## Unreleased$/## Version $STABLE_VERSION\/$PRERELEASE_VERSION ($date)/" CHANGELOG.md + sed -Ei "s/^## Unreleased$/## Version ${VERSION/\//\\\/} ($date)/" CHANGELOG.md - name: Set git user run: .github/scripts/set-git-user.sh @@ -69,8 +69,8 @@ jobs: # not using secrets.GITHUB_TOKEN since pull requests from that token do not run workflows GITHUB_TOKEN: ${{ secrets.BOT_TOKEN }} run: | - message="Prepare release ${STABLE_VERSION}/${PRERELEASE_VERSION}" - branch="prepare-release-${STABLE_VERSION}-${PRERELEASE_VERSION}" + message="Prepare release ${VERSION}" + branch="prepare-release-${VERSION/\//-}" git commit -a -m "$message" git push origin HEAD:$branch @@ -90,14 +90,14 @@ jobs: stable_version=$(./scripts/eachdist.py version --mode stable) stable_version=${stable_version//-dev/} if [[ $stable_version =~ ^([0-9]+)\.([0-9]+)\.0-dev$ ]]; then - major="${BASH_REMATCH[1]}" - minor="${BASH_REMATCH[2]}" - next_version="$major.$((minor + 1)).0" + stable_major="${BASH_REMATCH[1]}" + stable_minor="${BASH_REMATCH[2]}" + next_version="$stable_major.$((stable_minor + 1)).0" elif [[ $stable_version =~ ^([0-9]+)\.([0-9]+)\.0 ]]; then # pre-release version, e.g. 1.9.0rc - major="${BASH_REMATCH[1]}" - minor="${BASH_REMATCH[2]}" - next_version="$major.$minor.0" + stable_major="${BASH_REMATCH[1]}" + stable_minor="${BASH_REMATCH[2]}" + next_version="$stable_major.$stable_minor.0" else echo "unexpected stable_version: $stable_version" exit 1 @@ -112,9 +112,13 @@ jobs: exit 1 fi - echo "NEXT_STABLE_VERSION=$stable_major.$((stable_minor + 1)).0-dev" >> $GITHUB_ENV - echo "NEXT_PRERELEASE_VERSION=0.$((prerelease_minor + 1))b0-dev" >> $GITHUB_ENV - echo "NEXT_VERSION=${NEXT_STABLE_VERSION}/${NEXT_PRERELEASE_VERSION}" >> $GITHUB_ENV + next_stable_version="$stable_major.$((stable_minor + 1)).0-dev" + next_prerelease_version="0.$((prerelease_minor + 1))b0-dev" + + echo "NEXT_STABLE_VERSION=$next_stable_version" >> $GITHUB_ENV + echo "NEXT_PRERELEASE_VERSION=$next_prerelease_version" >> $GITHUB_ENV + echo "NEXT_VERSION=${next_stable_version}/${next_prerelease_version}" >> $GITHUB_ENV + echo "VERSION=${stable_version}/${prerelease_version}" >> $GITHUB_ENV - name: Update version run: .github/scripts/update-version.sh $NEXT_STABLE_VERSION $NEXT_PRERELEASE_VERSION diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 60910c9692e..9240b4dc31e 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -42,7 +42,7 @@ jobs: echo "STABLE_VERSION=$stable_version" >> $GITHUB_ENV echo "PRERELEASE_VERSION=$prerelease_version" >> $GITHUB_ENV - echo "VERSION=${STABLE_VERSION}/${PRERELEASE_VERSION}" >> $GITHUB_ENV + echo "VERSION=${stable_version}/${prerelease_version}" >> $GITHUB_ENV echo "PRIOR_VERSION_WHEN_PATCH=$prior_version_when_patch" >> $GITHUB_ENV From 58e5ac864e574c797504dbec16845d1fb7f7f516 Mon Sep 17 00:00:00 2001 From: Trask Stalnaker Date: Mon, 6 Jun 2022 13:55:41 -0700 Subject: [PATCH 24/51] More fixes --- .github/workflows/prepare-patch-release.yml | 5 ++-- .github/workflows/prepare-release-branch.yml | 25 ++++++++++---------- .github/workflows/release.yml | 14 +++++------ 3 files changed, 23 insertions(+), 21 deletions(-) diff --git a/.github/workflows/prepare-patch-release.yml b/.github/workflows/prepare-patch-release.yml index b308eb03231..44eecfe6c9c 100644 --- a/.github/workflows/prepare-patch-release.yml +++ b/.github/workflows/prepare-patch-release.yml @@ -22,6 +22,8 @@ jobs: - name: Set environment variables run: | stable_version=$(./scripts/eachdist.py version --mode stable) + prerelease_version=$(./scripts/eachdist.py version --mode prerelease) + if [[ $stable_version =~ ^([0-9]+\.[0-9]+)\.([0-9]+)$ ]]; then stable_major_minor="${BASH_REMATCH[1]}" stable_patch="${BASH_REMATCH[2]}" @@ -30,7 +32,6 @@ jobs: exit 1 fi - prerelease_version=$(./scripts/eachdist.py version --mode prerelease) if [[ $prerelease_version =~ ^0\.([0-9]+)b([0-9]+)$ ]]; then prerelease_minor="${BASH_REMATCH[1]}" prerelease_patch="${BASH_REMATCH[2]}" @@ -52,7 +53,7 @@ jobs: - name: Update the change log with the approximate release date run: | date=$(date "+%Y-%m-%d") - sed -Ei "s/^## Unreleased$/## Version $VERSION ($date)/" CHANGELOG.md + sed -Ei "s/^## Unreleased$/## Version ${VERSION/\//\\\/} ($date)/" CHANGELOG.md - name: Set git user run: .github/scripts/set-git-user.sh diff --git a/.github/workflows/prepare-release-branch.yml b/.github/workflows/prepare-release-branch.yml index 31e60ee37c9..95d836dd859 100644 --- a/.github/workflows/prepare-release-branch.yml +++ b/.github/workflows/prepare-release-branch.yml @@ -88,23 +88,25 @@ jobs: - name: Set environment variables run: | stable_version=$(./scripts/eachdist.py version --mode stable) + prerelease_version=$(./scripts/eachdist.py version --mode prerelease) + stable_version=${stable_version//-dev/} - if [[ $stable_version =~ ^([0-9]+)\.([0-9]+)\.0-dev$ ]]; then + prerelease_version=${prerelease_version//-dev/} + + if [[ $stable_version =~ ^([0-9]+)\.([0-9]+)\.0$ ]]; then stable_major="${BASH_REMATCH[1]}" stable_minor="${BASH_REMATCH[2]}" - next_version="$stable_major.$((stable_minor + 1)).0" + stable_next_version="$stable_major.$((stable_minor + 1)).0" elif [[ $stable_version =~ ^([0-9]+)\.([0-9]+)\.0 ]]; then # pre-release version, e.g. 1.9.0rc stable_major="${BASH_REMATCH[1]}" stable_minor="${BASH_REMATCH[2]}" - next_version="$stable_major.$stable_minor.0" + stable_next_version="$stable_major.$stable_minor.0" else echo "unexpected stable_version: $stable_version" exit 1 fi - prerelease_version=$(./scripts/eachdist.py version --mode prerelease) - prerelease_version=${prerelease_version//-dev/} if [[ $prerelease_version =~ ^0\.([0-9]+)b[0-9]+$ ]]; then prerelease_minor="${BASH_REMATCH[1]}" else @@ -112,22 +114,21 @@ jobs: exit 1 fi - next_stable_version="$stable_major.$((stable_minor + 1)).0-dev" - next_prerelease_version="0.$((prerelease_minor + 1))b0-dev" + prerelease_next_version="0.$((prerelease_minor + 1))b0" - echo "NEXT_STABLE_VERSION=$next_stable_version" >> $GITHUB_ENV - echo "NEXT_PRERELEASE_VERSION=$next_prerelease_version" >> $GITHUB_ENV - echo "NEXT_VERSION=${next_stable_version}/${next_prerelease_version}" >> $GITHUB_ENV + echo "STABLE_NEXT_VERSION=${stable_next_version}-dev" >> $GITHUB_ENV + echo "PRERELEASE_NEXT_VERSION=${prerelease_next_version}-dev" >> $GITHUB_ENV + echo "NEXT_VERSION=${stable_next_version}-dev/${prerelease_next_version}-dev" >> $GITHUB_ENV echo "VERSION=${stable_version}/${prerelease_version}" >> $GITHUB_ENV - name: Update version - run: .github/scripts/update-version.sh $NEXT_STABLE_VERSION $NEXT_PRERELEASE_VERSION + run: .github/scripts/update-version.sh $STABLE_NEXT_VERSION $PRERELEASE_NEXT_VERSION - name: Update the change log on main run: | # the actual release date on main will be updated at the end of the release workflow date=$(date "+%Y-%m-%d") - sed -Ei "s/^## Unreleased$/## Unreleased\n\n## Version $VERSION ($date)/" CHANGELOG.md + sed -Ei "s/^## Unreleased$/## Unreleased\n\n## Version ${VERSION/\//\\\/} ($date)/" CHANGELOG.md - name: Set git user run: .github/scripts/set-git-user.sh diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 9240b4dc31e..ff20ecf167f 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -78,7 +78,7 @@ jobs: # CHANGELOG_SECTION.md is also used at the end of the release workflow # for copying the change log updates to main - sed -n "0,/^## Version $VERSION /d;/^## Version /q;p" CHANGELOG.md \ + sed -n "0,/^## Version ${VERSION/\//\\\/} /d;/^## Version /q;p" CHANGELOG.md \ > /tmp/CHANGELOG_SECTION.md # the complex perl regex is needed because markdown docs render newlines as soft wraps @@ -109,20 +109,20 @@ jobs: # this was not a patch release, so the version exists already in the CHANGELOG.md # update the release date - date=$(gh release view v$VERSION --json publishedAt --jq .publishedAt | sed 's/T.*//') - sed -Ei "s/## Version $VERSION .*/## Version $VERSION ($date)/" CHANGELOG.md + date=$(gh release view v$STABLE_VERSION --json publishedAt --jq .publishedAt | sed 's/T.*//') + sed -Ei "s/## Version ${VERSION/\//\\\/} .*/## Version ${VERSION/\//\\\/} ($date)/" CHANGELOG.md # the entries are copied over from the release branch to support workflows # where change log entries may be updated after preparing the release branch # copy the portion above the release, up to and including the heading - sed -n "0,/^## Version $VERSION ($date)/p" CHANGELOG.md > /tmp/CHANGELOG.md + sed -n "0,/^## Version ${VERSION/\//\\\/} ($date)/p" CHANGELOG.md > /tmp/CHANGELOG.md # copy the release notes cat /tmp/CHANGELOG_SECTION.md >> /tmp/CHANGELOG.md # copy the portion below the release - sed -n "0,/^## Version $VERSION /d;0,/^## Version /{/^## Version/!d};p" CHANGELOG.md \ + sed -n "0,/^## Version ${VERSION/\//\\\/} /d;0,/^## Version /{/^## Version/!d};p" CHANGELOG.md \ >> /tmp/CHANGELOG.md # update the real CHANGELOG.md @@ -134,8 +134,8 @@ jobs: sed -n "0,/^## Version /{ /^## Version /!p }" CHANGELOG.md > /tmp/CHANGELOG.md # add the heading - date=$(gh release view v$VERSION --json publishedAt --jq .publishedAt | sed 's/T.*//') - echo "## Version $VERSION ($date)" >> /tmp/CHANGELOG.md + date=$(gh release view v$STABLE_VERSION --json publishedAt --jq .publishedAt | sed 's/T.*//') + echo "## Version ${VERSION/\//\\\/} ($date)" >> /tmp/CHANGELOG.md # copy the release notes cat /tmp/CHANGELOG_SECTION.md >> /tmp/CHANGELOG.md From 72821b22edce3ddde0d4d3518e25a64fec666ea8 Mon Sep 17 00:00:00 2001 From: Trask Stalnaker Date: Tue, 7 Jun 2022 15:29:50 -0700 Subject: [PATCH 25/51] Fix RELEASING doc --- RELEASING.md | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/RELEASING.md b/RELEASING.md index 5d1d3d42680..b54ccdb426d 100644 --- a/RELEASING.md +++ b/RELEASING.md @@ -34,14 +34,15 @@ ## Notes about "pre-releases" -* Pre-release versions (e.g. `1.9.0rc1`) are supported, and will cause a "short-term" release branch to be created - based on the full version name (e.g. `release/v1.9.0rc1` instead of a "long-term" release branch name like - `release/v1.9.x`). +* Pre-release versions (e.g. `1.12.0rc1-0.31b0`) are supported, and will cause a "short-term" release branch + to be created based on the full version name + (e.g. `release/v1.12.0rc1-0.31b0` instead of a "long-term" release branch name like `release/v1.9.x-0.31bx`). * Patch releases are not supported on short-term release branches. -* The version in `main` in this case will be bumped to the release version (e.g. `1.9.0-dev`). +* The version in `main` in this case will be bumped to the release version (e.g. `1.12.0-dev/0.32b0-dev`). * To make a second pre-release version, manually update the version in `main` - (e.g. update it from `1.9.0-dev` to `1.9.0rc2-dev`) + (e.g. update it from `1.12.0-dev` to `1.12.0rc2-dev`) before running the prepare release branch workflow for that release. +* Note that pre-releases are not needed for unstable artifacts. ## After the release From ff6f57418803276a980ab4e4c2408a1ad54e799e Mon Sep 17 00:00:00 2001 From: Trask Stalnaker Date: Tue, 7 Jun 2022 16:54:44 -0700 Subject: [PATCH 26/51] Another fix --- .github/workflows/release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index ff20ecf167f..eecd28873fc 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -135,7 +135,7 @@ jobs: # add the heading date=$(gh release view v$STABLE_VERSION --json publishedAt --jq .publishedAt | sed 's/T.*//') - echo "## Version ${VERSION/\//\\\/} ($date)" >> /tmp/CHANGELOG.md + echo "## Version $VERSION ($date)" >> /tmp/CHANGELOG.md # copy the release notes cat /tmp/CHANGELOG_SECTION.md >> /tmp/CHANGELOG.md From 8e2d30b973bb6bc67babf03e2265ab5dca4d06fa Mon Sep 17 00:00:00 2001 From: Trask Stalnaker Date: Wed, 15 Jun 2022 14:27:58 -0700 Subject: [PATCH 27/51] Fix repo links --- RELEASING.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/RELEASING.md b/RELEASING.md index b54ccdb426d..374f2682586 100644 --- a/RELEASING.md +++ b/RELEASING.md @@ -2,7 +2,7 @@ ## Preparing a new major or minor release -* Run the [Prepare release branch workflow](https://github.com/trask/repository-template/actions/workflows/prepare-release-branch.yml). +* Run the [Prepare release branch workflow](https://github.com/open-telemetry/opentelemetry-python/actions/workflows/prepare-release-branch.yml). * Press the "Run workflow" button, and leave the default branch `main` selected. * Review and merge the two pull requests that it creates (one is targeted to the release branch and one is targeted to `main`). @@ -10,14 +10,14 @@ ## Preparing a new patch release * Backport pull request(s) to the release branch. - * Run the [Backport workflow](https://github.com/trask/repository-template/actions/workflows/backport.yml). + * Run the [Backport workflow](https://github.com/open-telemetry/opentelemetry-python/actions/workflows/backport.yml). * Press the "Run workflow" button, then select the release branch from the dropdown list, e.g. `release/v1.9.x`, then enter the pull request number that you want to backport, then click the "Run workflow" button below that. * Review and merge the backport pull request that it generates. * Merge a pull request to the release branch updating the `CHANGELOG.md`. * The heading for the unreleased entries should be `## Unreleased`. -* Run the [Prepare patch release workflow](https://github.com/trask/repository-template/actions/workflows/prepare-patch-release.yml). +* Run the [Prepare patch release workflow](https://github.com/open-telemetry/opentelemetry-python/actions/workflows/prepare-patch-release.yml). * Press the "Run workflow" button, then select the release branch from the dropdown list, e.g. `release/v1.9.x`, and click the "Run workflow" button below that. * Review and merge the pull request that it creates for updating the version. From aa20d94823af8606fa34789f9319627a00d22f9b Mon Sep 17 00:00:00 2001 From: Trask Stalnaker Date: Wed, 15 Jun 2022 14:53:04 -0700 Subject: [PATCH 28/51] Fix publishing --- .github/workflows/publish.yml | 37 ----------------------------------- .github/workflows/release.yml | 31 +++++++++++++++++++++++++++++ 2 files changed, 31 insertions(+), 37 deletions(-) delete mode 100644 .github/workflows/publish.yml diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml deleted file mode 100644 index 0921357cb33..00000000000 --- a/.github/workflows/publish.yml +++ /dev/null @@ -1,37 +0,0 @@ -name: Publish - -on: - release: - types: [published] - -jobs: - publish: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v1 - - uses: actions/setup-python@v1 - with: - python-version: '3.7' - - name: Build wheels - run: ./scripts/build.sh - - name: Install twine - run: | - pip install twine - # The step below publishes to testpypi in order to catch any issues - # with the package configuration that would cause a failure to upload - # to pypi. One example of such a failure is if a classifier is - # rejected by pypi (e.g "3 - Beta"). This would cause a failure during the - # middle of the package upload causing the action to fail, and certain packages - # might have already been updated, this would be bad. - - name: Publish to TestPyPI - env: - TWINE_USERNAME: '__token__' - TWINE_PASSWORD: ${{ secrets.test_pypi_token }} - run: | - twine upload --repository testpypi --skip-existing --verbose dist/* - - name: Publish to PyPI - env: - TWINE_USERNAME: '__token__' - TWINE_PASSWORD: ${{ secrets.pypi_password }} - run: | - twine upload --skip-existing --verbose dist/* diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index eecd28873fc..335c729bdfe 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -96,6 +96,37 @@ jobs: --discussion-category announcements \ v$STABLE_VERSION + - uses: actions/setup-python@v1 + with: + python-version: '3.7' + + - name: Build wheels + run: ./scripts/build.sh + + - name: Install twine + run: | + pip install twine + + # The step below publishes to testpypi in order to catch any issues + # with the package configuration that would cause a failure to upload + # to pypi. One example of such a failure is if a classifier is + # rejected by pypi (e.g "3 - Beta"). This would cause a failure during the + # middle of the package upload causing the action to fail, and certain packages + # might have already been updated, this would be bad. + - name: Publish to TestPyPI + env: + TWINE_USERNAME: '__token__' + TWINE_PASSWORD: ${{ secrets.test_pypi_token }} + run: | + twine upload --repository testpypi --skip-existing --verbose dist/* + + - name: Publish to PyPI + env: + TWINE_USERNAME: '__token__' + TWINE_PASSWORD: ${{ secrets.pypi_password }} + run: | + twine upload --skip-existing --verbose dist/* + - uses: actions/checkout@v3 with: # the step below is creating a pull request against main From 260c6048d4caeb2224488849893f9a4cb2a76db6 Mon Sep 17 00:00:00 2001 From: Trask Stalnaker Date: Thu, 16 Jun 2022 15:00:40 -0700 Subject: [PATCH 29/51] Rename prerelease to unstable --- .github/workflows/prepare-patch-release.yml | 18 +++++----- .github/workflows/prepare-release-branch.yml | 36 ++++++++++---------- .github/workflows/release.yml | 18 +++++----- 3 files changed, 36 insertions(+), 36 deletions(-) diff --git a/.github/workflows/prepare-patch-release.yml b/.github/workflows/prepare-patch-release.yml index 44eecfe6c9c..80656064c9c 100644 --- a/.github/workflows/prepare-patch-release.yml +++ b/.github/workflows/prepare-patch-release.yml @@ -22,7 +22,7 @@ jobs: - name: Set environment variables run: | stable_version=$(./scripts/eachdist.py version --mode stable) - prerelease_version=$(./scripts/eachdist.py version --mode prerelease) + unstable_version=$(./scripts/eachdist.py version --mode prerelease) if [[ $stable_version =~ ^([0-9]+\.[0-9]+)\.([0-9]+)$ ]]; then stable_major_minor="${BASH_REMATCH[1]}" @@ -32,23 +32,23 @@ jobs: exit 1 fi - if [[ $prerelease_version =~ ^0\.([0-9]+)b([0-9]+)$ ]]; then - prerelease_minor="${BASH_REMATCH[1]}" - prerelease_patch="${BASH_REMATCH[2]}" + if [[ $unstable_version =~ ^0\.([0-9]+)b([0-9]+)$ ]]; then + unstable_minor="${BASH_REMATCH[1]}" + unstable_patch="${BASH_REMATCH[2]}" else - echo "unexpected prerelease_version: $prerelease_version" + echo "unexpected unstable_version: $unstable_version" exit 1 fi stable_version="$stable_major_minor.$((stable_patch + 1))" - prerelease_version="0.${prerelease_minor}b$((prerelease_patch + 1))" + unstable_version="0.${unstable_minor}b$((unstable_patch + 1))" echo "STABLE_VERSION=$stable_version" >> $GITHUB_ENV - echo "PRERELEASE_VERSION=$prerelease_version" >> $GITHUB_ENV - echo "VERSION=${stable_version}/${prerelease_version}" >> $GITHUB_ENV + echo "UNSTABLE_VERSION=$unstable_version" >> $GITHUB_ENV + echo "VERSION=${stable_version}/${unstable_version}" >> $GITHUB_ENV - name: Update version - run: .github/scripts/update-version.sh $STABLE_VERSION $PRERELEASE_VERSION + run: .github/scripts/update-version.sh $STABLE_VERSION $UNSTABLE_VERSION - name: Update the change log with the approximate release date run: | diff --git a/.github/workflows/prepare-release-branch.yml b/.github/workflows/prepare-release-branch.yml index 95d836dd859..50cf9022fc9 100644 --- a/.github/workflows/prepare-release-branch.yml +++ b/.github/workflows/prepare-release-branch.yml @@ -31,16 +31,16 @@ jobs: stable_version=$(./scripts/eachdist.py version --mode stable) stable_version=${stable_version//-dev/} - prerelease_version=$(./scripts/eachdist.py version --mode prerelease) - prerelease_version=${prerelease_version//-dev/} + unstable_version=$(./scripts/eachdist.py version --mode prerelease) + unstable_version=${unstable_version//-dev/} if [[ $stable_version =~ ^([0-9]+)\.([0-9]+)\.0$ ]]; then stable_version_branch_part=$(echo $stable_version | sed -E 's/([0-9]+)\.([0-9]+)\.0/\1.\2.x/') - prerelease_version_branch_part=$(echo $prerelease_version | sed -E 's/0\.([0-9]+)b0/0.\1bx/') - release_branch_name="release/v${stable_version_branch_part}-${prerelease_version_branch_part}" + unstable_version_branch_part=$(echo $unstable_version | sed -E 's/0\.([0-9]+)b0/0.\1bx/') + release_branch_name="release/v${stable_version_branch_part}-${unstable_version_branch_part}" elif [[ $stable_version =~ ^([0-9]+)\.([0-9]+)\.0 ]]; then # pre-release version, e.g. 1.9.0rc - release_branch_name="release/v$stable_version-$prerelease_version" + release_branch_name="release/v$stable_version-$unstable_version" else echo "unexpected version: $stable_version" exit 1 @@ -49,12 +49,12 @@ jobs: git push origin HEAD:$release_branch_name echo "STABLE_VERSION=$stable_version" >> $GITHUB_ENV - echo "PRERELEASE_VERSION=$prerelease_version" >> $GITHUB_ENV - echo "VERSION=${stable_version}/${prerelease_version}" >> $GITHUB_ENV + echo "UNSTABLE_VERSION=$unstable_version" >> $GITHUB_ENV + echo "VERSION=${stable_version}/${unstable_version}" >> $GITHUB_ENV echo "RELEASE_BRANCH_NAME=$release_branch_name" >> $GITHUB_ENV - name: Update version - run: .github/scripts/update-version.sh $STABLE_VERSION $PRERELEASE_VERSION + run: .github/scripts/update-version.sh $STABLE_VERSION $UNSTABLE_VERSION - name: Update the change log with the approximate release date run: | @@ -88,10 +88,10 @@ jobs: - name: Set environment variables run: | stable_version=$(./scripts/eachdist.py version --mode stable) - prerelease_version=$(./scripts/eachdist.py version --mode prerelease) + unstable_version=$(./scripts/eachdist.py version --mode prerelease) stable_version=${stable_version//-dev/} - prerelease_version=${prerelease_version//-dev/} + unstable_version=${unstable_version//-dev/} if [[ $stable_version =~ ^([0-9]+)\.([0-9]+)\.0$ ]]; then stable_major="${BASH_REMATCH[1]}" @@ -107,22 +107,22 @@ jobs: exit 1 fi - if [[ $prerelease_version =~ ^0\.([0-9]+)b[0-9]+$ ]]; then - prerelease_minor="${BASH_REMATCH[1]}" + if [[ $unstable_version =~ ^0\.([0-9]+)b[0-9]+$ ]]; then + unstable_minor="${BASH_REMATCH[1]}" else - echo "unexpected prerelease_version: $prerelease_version" + echo "unexpected unstable_version: $unstable_version" exit 1 fi - prerelease_next_version="0.$((prerelease_minor + 1))b0" + unstable_next_version="0.$((unstable_minor + 1))b0" echo "STABLE_NEXT_VERSION=${stable_next_version}-dev" >> $GITHUB_ENV - echo "PRERELEASE_NEXT_VERSION=${prerelease_next_version}-dev" >> $GITHUB_ENV - echo "NEXT_VERSION=${stable_next_version}-dev/${prerelease_next_version}-dev" >> $GITHUB_ENV - echo "VERSION=${stable_version}/${prerelease_version}" >> $GITHUB_ENV + echo "UNSTABLE_NEXT_VERSION=${unstable_next_version}-dev" >> $GITHUB_ENV + echo "NEXT_VERSION=${stable_next_version}-dev/${unstable_next_version}-dev" >> $GITHUB_ENV + echo "VERSION=${stable_version}/${unstable_version}" >> $GITHUB_ENV - name: Update version - run: .github/scripts/update-version.sh $STABLE_NEXT_VERSION $PRERELEASE_NEXT_VERSION + run: .github/scripts/update-version.sh $STABLE_NEXT_VERSION $UNSTABLE_NEXT_VERSION - name: Update the change log on main run: | diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 335c729bdfe..423099af85f 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -17,7 +17,7 @@ jobs: - name: Set environment variables run: | stable_version=$(./scripts/eachdist.py version --mode stable) - prerelease_version=$(./scripts/eachdist.py version --mode prerelease) + unstable_version=$(./scripts/eachdist.py version --mode prerelease) if [[ $stable_version =~ ^([0-9]+)\.([0-9]+)\.([0-9]+) ]]; then stable_major="${BASH_REMATCH[1]}" @@ -28,21 +28,21 @@ jobs: exit 1 fi if [[ $stable_patch != 0 ]]; then - if [[ $prerelease_version =~ ^0\.([0-9]+)b([0-9]+)$ ]]; then - prerelease_minor="${BASH_REMATCH[1]}" - prerelease_patch="${BASH_REMATCH[2]}" + if [[ $unstable_version =~ ^0\.([0-9]+)b([0-9]+)$ ]]; then + unstable_minor="${BASH_REMATCH[1]}" + unstable_patch="${BASH_REMATCH[2]}" else - echo "unexpected prerelease_version: $prerelease_version" + echo "unexpected unstable_version: $unstable_version" exit 1 fi - if [[ $prerelease_patch != 0 ]]; then - prior_version_when_patch="$stable_major.$stable_minor.$((stable_patch - 1))/0.${prerelease_minor}b$((prerelease_patch - 1))" + if [[ $unstable_patch != 0 ]]; then + prior_version_when_patch="$stable_major.$stable_minor.$((stable_patch - 1))/0.${unstable_minor}b$((unstable_patch - 1))" fi fi echo "STABLE_VERSION=$stable_version" >> $GITHUB_ENV - echo "PRERELEASE_VERSION=$prerelease_version" >> $GITHUB_ENV - echo "VERSION=${stable_version}/${prerelease_version}" >> $GITHUB_ENV + echo "UNSTABLE_VERSION=$unstable_version" >> $GITHUB_ENV + echo "VERSION=${stable_version}/${unstable_version}" >> $GITHUB_ENV echo "PRIOR_VERSION_WHEN_PATCH=$prior_version_when_patch" >> $GITHUB_ENV From b0e0e7159e46a751a271218555829f14a840144c Mon Sep 17 00:00:00 2001 From: Trask Stalnaker Date: Thu, 16 Jun 2022 15:15:33 -0700 Subject: [PATCH 30/51] Better prerelease handling --- .github/workflows/prepare-release-branch.yml | 41 ++++++++++++++++---- RELEASING.md | 16 ++++---- 2 files changed, 43 insertions(+), 14 deletions(-) diff --git a/.github/workflows/prepare-release-branch.yml b/.github/workflows/prepare-release-branch.yml index 50cf9022fc9..22d03a30427 100644 --- a/.github/workflows/prepare-release-branch.yml +++ b/.github/workflows/prepare-release-branch.yml @@ -1,6 +1,10 @@ name: Prepare release branch on: workflow_dispatch: + inputs: + prerelease_version: + description: "Pre-release version number? (e.g. 1.9.0-rc.2)" + required: false jobs: prereqs: @@ -8,7 +12,10 @@ jobs: steps: - uses: actions/checkout@v3 - - run: | + - name: Verify prerequisites + env: + PRERELEASE_VERSION: ${{ github.event.inputs.prerelease_version }} + run: | if [[ $GITHUB_REF_NAME != main ]]; then echo this workflow should only be run against main exit 1 @@ -19,6 +26,15 @@ jobs: exit 1 fi + if [[ ! -z $PRERELEASE_VERSION ]]; then + version=$(.github/scripts/get-version.sh) + version=${version//-dev/} + if [[ $PRERELEASE_VERSION != ${version}* ]]; then + echo "$PRERELEASE_VERSION is not a prerelease for the version on main ($version)" + exit 1 + fi + fi + create-pull-request-against-release-branch: runs-on: ubuntu-latest needs: prereqs @@ -26,10 +42,15 @@ jobs: - uses: actions/checkout@v3 - name: Create release branch - id: create-release-branch + env: + PRERELEASE_VERSION: ${{ github.event.inputs.prerelease_version }} run: | - stable_version=$(./scripts/eachdist.py version --mode stable) - stable_version=${stable_version//-dev/} + if [[ -z $PRERELEASE_VERSION ]]; then + stable_version=$(./scripts/eachdist.py version --mode stable) + stable_version=${stable_version//-dev/} + else + stable_version=$PRERELEASE_VERSION + fi unstable_version=$(./scripts/eachdist.py version --mode prerelease) unstable_version=${unstable_version//-dev/} @@ -86,11 +107,17 @@ jobs: - uses: actions/checkout@v3 - name: Set environment variables + env: + PRERELEASE_VERSION: ${{ github.event.inputs.prerelease_version }} run: | - stable_version=$(./scripts/eachdist.py version --mode stable) - unstable_version=$(./scripts/eachdist.py version --mode prerelease) + if [[ -z $PRERELEASE_VERSION ]]; then + stable_version=$(./scripts/eachdist.py version --mode stable) + stable_version=${stable_version//-dev/} + else + stable_version=$PRERELEASE_VERSION + fi - stable_version=${stable_version//-dev/} + unstable_version=$(./scripts/eachdist.py version --mode prerelease) unstable_version=${unstable_version//-dev/} if [[ $stable_version =~ ^([0-9]+)\.([0-9]+)\.0$ ]]; then diff --git a/RELEASING.md b/RELEASING.md index 374f2682586..cb549ec5900 100644 --- a/RELEASING.md +++ b/RELEASING.md @@ -4,6 +4,9 @@ * Run the [Prepare release branch workflow](https://github.com/open-telemetry/opentelemetry-python/actions/workflows/prepare-release-branch.yml). * Press the "Run workflow" button, and leave the default branch `main` selected. + * If making a pre-release of stable components (e.g. release candidate), + enter the pre-release version number, e.g. `1.9.0-rc.2`. + (otherwise the workflow will pick up the version from `main` and just remove the `-dev` suffix). * Review and merge the two pull requests that it creates (one is targeted to the release branch and one is targeted to `main`). @@ -34,15 +37,14 @@ ## Notes about "pre-releases" -* Pre-release versions (e.g. `1.12.0rc1-0.31b0`) are supported, and will cause a "short-term" release branch +* Pre-release versions (e.g. `1.9.0rc1`) are supported, and will cause a "short-term" release branch to be created based on the full version name - (e.g. `release/v1.12.0rc1-0.31b0` instead of a "long-term" release branch name like `release/v1.9.x-0.31bx`). + (e.g. `release/v1.9.0rc1-0.21b0` instead of a "long-term" release branch name like `release/v1.9.x-0.21bx`). * Patch releases are not supported on short-term release branches. -* The version in `main` in this case will be bumped to the release version (e.g. `1.12.0-dev/0.32b0-dev`). -* To make a second pre-release version, manually update the version in `main` - (e.g. update it from `1.12.0-dev` to `1.12.0rc2-dev`) - before running the prepare release branch workflow for that release. -* Note that pre-releases are not needed for unstable artifacts. +* The stable version in `main` in this case will remain the same (e.g. `1.9.0-dev`), since the next release version + (that is not a prereleaes) is still `1.9.0`. +* The unstable version in `main` will be bumped (e.g. `0.22b0-dev`). +* Note that the workflow does not support the concept of a pre-release for unstable artifacts. ## After the release From 0485f88de5ecad90500fa12a0af3c96eb51345cb Mon Sep 17 00:00:00 2001 From: Trask Stalnaker Date: Thu, 16 Jun 2022 15:26:38 -0700 Subject: [PATCH 31/51] Publish to PyPI before publishing GitHub release --- .github/workflows/release.yml | 63 ++++++++++++++++++----------------- 1 file changed, 32 insertions(+), 31 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 423099af85f..ef17655a15a 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -64,6 +64,38 @@ jobs: # back to the release branch - uses: actions/checkout@v3 + # next few steps publish to pypi + - uses: actions/setup-python@v1 + with: + python-version: '3.7' + + - name: Build wheels + run: ./scripts/build.sh + + - name: Install twine + run: | + pip install twine + + # The step below publishes to testpypi in order to catch any issues + # with the package configuration that would cause a failure to upload + # to pypi. One example of such a failure is if a classifier is + # rejected by pypi (e.g "3 - Beta"). This would cause a failure during the + # middle of the package upload causing the action to fail, and certain packages + # might have already been updated, this would be bad. + - name: Publish to TestPyPI + env: + TWINE_USERNAME: '__token__' + TWINE_PASSWORD: ${{ secrets.test_pypi_token }} + run: | + twine upload --repository testpypi --skip-existing --verbose dist/* + + - name: Publish to PyPI + env: + TWINE_USERNAME: '__token__' + TWINE_PASSWORD: ${{ secrets.pypi_password }} + run: | + twine upload --skip-existing --verbose dist/* + - name: Generate release notes env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} @@ -96,37 +128,6 @@ jobs: --discussion-category announcements \ v$STABLE_VERSION - - uses: actions/setup-python@v1 - with: - python-version: '3.7' - - - name: Build wheels - run: ./scripts/build.sh - - - name: Install twine - run: | - pip install twine - - # The step below publishes to testpypi in order to catch any issues - # with the package configuration that would cause a failure to upload - # to pypi. One example of such a failure is if a classifier is - # rejected by pypi (e.g "3 - Beta"). This would cause a failure during the - # middle of the package upload causing the action to fail, and certain packages - # might have already been updated, this would be bad. - - name: Publish to TestPyPI - env: - TWINE_USERNAME: '__token__' - TWINE_PASSWORD: ${{ secrets.test_pypi_token }} - run: | - twine upload --repository testpypi --skip-existing --verbose dist/* - - - name: Publish to PyPI - env: - TWINE_USERNAME: '__token__' - TWINE_PASSWORD: ${{ secrets.pypi_password }} - run: | - twine upload --skip-existing --verbose dist/* - - uses: actions/checkout@v3 with: # the step below is creating a pull request against main From 778b3431caf5dc997bca460942835e236e63c715 Mon Sep 17 00:00:00 2001 From: Trask Stalnaker Date: Fri, 17 Jun 2022 19:33:53 -0700 Subject: [PATCH 32/51] Python specific prerelease numbering --- RELEASING.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/RELEASING.md b/RELEASING.md index cb549ec5900..615b2b50408 100644 --- a/RELEASING.md +++ b/RELEASING.md @@ -5,7 +5,7 @@ * Run the [Prepare release branch workflow](https://github.com/open-telemetry/opentelemetry-python/actions/workflows/prepare-release-branch.yml). * Press the "Run workflow" button, and leave the default branch `main` selected. * If making a pre-release of stable components (e.g. release candidate), - enter the pre-release version number, e.g. `1.9.0-rc.2`. + enter the pre-release version number, e.g. `1.9.0rc2`. (otherwise the workflow will pick up the version from `main` and just remove the `-dev` suffix). * Review and merge the two pull requests that it creates (one is targeted to the release branch and one is targeted to `main`). @@ -37,9 +37,9 @@ ## Notes about "pre-releases" -* Pre-release versions (e.g. `1.9.0rc1`) are supported, and will cause a "short-term" release branch +* Pre-release versions (e.g. `1.9.0rc2`) are supported, and will cause a "short-term" release branch to be created based on the full version name - (e.g. `release/v1.9.0rc1-0.21b0` instead of a "long-term" release branch name like `release/v1.9.x-0.21bx`). + (e.g. `release/v1.9.0rc2-0.21b0` instead of a "long-term" release branch name like `release/v1.9.x-0.21bx`). * Patch releases are not supported on short-term release branches. * The stable version in `main` in this case will remain the same (e.g. `1.9.0-dev`), since the next release version (that is not a prereleaes) is still `1.9.0`. From fbb7cb4c176439c6cde27dd6b0f6265452dea03c Mon Sep 17 00:00:00 2001 From: Trask Stalnaker Date: Fri, 17 Jun 2022 19:34:07 -0700 Subject: [PATCH 33/51] Switch to opentelemetrybot acct --- .github/scripts/set-git-user.sh | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/scripts/set-git-user.sh b/.github/scripts/set-git-user.sh index c5d5b328ef5..a4c68b0e308 100755 --- a/.github/scripts/set-git-user.sh +++ b/.github/scripts/set-git-user.sh @@ -1,5 +1,4 @@ #!/bin/bash -e -# TODO update with opentelemetry-python-bot or a shared otel bot -git config user.name opentelemetry-java-bot -git config user.email 97938252+opentelemetry-java-bot@users.noreply.github.com +git config user.name opentelemetrybot +git config user.email 107717825+opentelemetrybot@users.noreply.github.com From ad0ecba7df7fbb672b1403241f48c7146fb146f5 Mon Sep 17 00:00:00 2001 From: Trask Stalnaker Date: Fri, 17 Jun 2022 19:45:46 -0700 Subject: [PATCH 34/51] Update dev versioning strategy --- .github/workflows/prepare-release-branch.yml | 20 +++++++++---------- RELEASING.md | 6 +++--- eachdist.ini | 4 ++-- .../exporter/jaeger/proto/grpc/version.py | 2 +- .../exporter/jaeger/thrift/version.py | 2 +- .../opentelemetry/exporter/jaeger/version.py | 2 +- .../exporter/opencensus/version.py | 2 +- .../exporter/otlp/proto/grpc/version.py | 2 +- .../exporter/otlp/proto/http/version.py | 2 +- .../opentelemetry/exporter/otlp/version.py | 2 +- .../exporter/prometheus/version.py | 2 +- .../exporter/zipkin/json/version.py | 2 +- .../exporter/zipkin/proto/http/version.py | 2 +- .../opentelemetry/exporter/zipkin/version.py | 2 +- .../src/opentelemetry/version.py | 2 +- .../src/opentelemetry/proto/version.py | 2 +- .../src/opentelemetry/sdk/version.py | 2 +- .../src/opentelemetry/semconv/version.py | 2 +- .../opentelemetry/propagators/b3/version.py | 2 +- .../propagators/jaeger/version.py | 2 +- .../shim/opentracing_shim/version.py | 2 +- .../src/opentelemetry/test/version.py | 2 +- 22 files changed, 34 insertions(+), 34 deletions(-) diff --git a/.github/workflows/prepare-release-branch.yml b/.github/workflows/prepare-release-branch.yml index 22d03a30427..70b996b6bbc 100644 --- a/.github/workflows/prepare-release-branch.yml +++ b/.github/workflows/prepare-release-branch.yml @@ -28,7 +28,7 @@ jobs: if [[ ! -z $PRERELEASE_VERSION ]]; then version=$(.github/scripts/get-version.sh) - version=${version//-dev/} + version=${version//.dev/} if [[ $PRERELEASE_VERSION != ${version}* ]]; then echo "$PRERELEASE_VERSION is not a prerelease for the version on main ($version)" exit 1 @@ -47,20 +47,20 @@ jobs: run: | if [[ -z $PRERELEASE_VERSION ]]; then stable_version=$(./scripts/eachdist.py version --mode stable) - stable_version=${stable_version//-dev/} + stable_version=${stable_version//.dev/} else stable_version=$PRERELEASE_VERSION fi unstable_version=$(./scripts/eachdist.py version --mode prerelease) - unstable_version=${unstable_version//-dev/} + unstable_version=${unstable_version//.dev/} if [[ $stable_version =~ ^([0-9]+)\.([0-9]+)\.0$ ]]; then stable_version_branch_part=$(echo $stable_version | sed -E 's/([0-9]+)\.([0-9]+)\.0/\1.\2.x/') unstable_version_branch_part=$(echo $unstable_version | sed -E 's/0\.([0-9]+)b0/0.\1bx/') release_branch_name="release/v${stable_version_branch_part}-${unstable_version_branch_part}" elif [[ $stable_version =~ ^([0-9]+)\.([0-9]+)\.0 ]]; then - # pre-release version, e.g. 1.9.0rc + # pre-release version, e.g. 1.9.0rc2 release_branch_name="release/v$stable_version-$unstable_version" else echo "unexpected version: $stable_version" @@ -112,20 +112,20 @@ jobs: run: | if [[ -z $PRERELEASE_VERSION ]]; then stable_version=$(./scripts/eachdist.py version --mode stable) - stable_version=${stable_version//-dev/} + stable_version=${stable_version//.dev/} else stable_version=$PRERELEASE_VERSION fi unstable_version=$(./scripts/eachdist.py version --mode prerelease) - unstable_version=${unstable_version//-dev/} + unstable_version=${unstable_version//.dev/} if [[ $stable_version =~ ^([0-9]+)\.([0-9]+)\.0$ ]]; then stable_major="${BASH_REMATCH[1]}" stable_minor="${BASH_REMATCH[2]}" stable_next_version="$stable_major.$((stable_minor + 1)).0" elif [[ $stable_version =~ ^([0-9]+)\.([0-9]+)\.0 ]]; then - # pre-release version, e.g. 1.9.0rc + # pre-release version, e.g. 1.9.0rc2 stable_major="${BASH_REMATCH[1]}" stable_minor="${BASH_REMATCH[2]}" stable_next_version="$stable_major.$stable_minor.0" @@ -143,9 +143,9 @@ jobs: unstable_next_version="0.$((unstable_minor + 1))b0" - echo "STABLE_NEXT_VERSION=${stable_next_version}-dev" >> $GITHUB_ENV - echo "UNSTABLE_NEXT_VERSION=${unstable_next_version}-dev" >> $GITHUB_ENV - echo "NEXT_VERSION=${stable_next_version}-dev/${unstable_next_version}-dev" >> $GITHUB_ENV + echo "STABLE_NEXT_VERSION=${stable_next_version}.dev" >> $GITHUB_ENV + echo "UNSTABLE_NEXT_VERSION=${unstable_next_version}.dev" >> $GITHUB_ENV + echo "NEXT_VERSION=${stable_next_version}.dev/${unstable_next_version}.dev" >> $GITHUB_ENV echo "VERSION=${stable_version}/${unstable_version}" >> $GITHUB_ENV - name: Update version diff --git a/RELEASING.md b/RELEASING.md index 615b2b50408..468d89bd73e 100644 --- a/RELEASING.md +++ b/RELEASING.md @@ -6,7 +6,7 @@ * Press the "Run workflow" button, and leave the default branch `main` selected. * If making a pre-release of stable components (e.g. release candidate), enter the pre-release version number, e.g. `1.9.0rc2`. - (otherwise the workflow will pick up the version from `main` and just remove the `-dev` suffix). + (otherwise the workflow will pick up the version from `main` and just remove the `.dev` suffix). * Review and merge the two pull requests that it creates (one is targeted to the release branch and one is targeted to `main`). @@ -41,9 +41,9 @@ to be created based on the full version name (e.g. `release/v1.9.0rc2-0.21b0` instead of a "long-term" release branch name like `release/v1.9.x-0.21bx`). * Patch releases are not supported on short-term release branches. -* The stable version in `main` in this case will remain the same (e.g. `1.9.0-dev`), since the next release version +* The stable version in `main` in this case will remain the same (e.g. `1.9.0.dev`), since the next release version (that is not a prereleaes) is still `1.9.0`. -* The unstable version in `main` will be bumped (e.g. `0.22b0-dev`). +* The unstable version in `main` will be bumped (e.g. `0.22b0.dev`). * Note that the workflow does not support the concept of a pre-release for unstable artifacts. ## After the release diff --git a/eachdist.ini b/eachdist.ini index b6b3b24fcd7..2909ba627b1 100644 --- a/eachdist.ini +++ b/eachdist.ini @@ -11,7 +11,7 @@ sortfirst= exporter/* [stable] -version=1.14.0-dev +version=1.14.0.dev packages= opentelemetry-sdk @@ -30,7 +30,7 @@ packages= opentelemetry-api [prerelease] -version=0.35b0-dev +version=0.35b0.dev packages= opentelemetry-opentracing-shim diff --git a/exporter/opentelemetry-exporter-jaeger-proto-grpc/src/opentelemetry/exporter/jaeger/proto/grpc/version.py b/exporter/opentelemetry-exporter-jaeger-proto-grpc/src/opentelemetry/exporter/jaeger/proto/grpc/version.py index 16f468f525c..b1fba7a3e4c 100644 --- a/exporter/opentelemetry-exporter-jaeger-proto-grpc/src/opentelemetry/exporter/jaeger/proto/grpc/version.py +++ b/exporter/opentelemetry-exporter-jaeger-proto-grpc/src/opentelemetry/exporter/jaeger/proto/grpc/version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. -__version__ = "1.14.0-dev" +__version__ = "1.14.0.dev" diff --git a/exporter/opentelemetry-exporter-jaeger-thrift/src/opentelemetry/exporter/jaeger/thrift/version.py b/exporter/opentelemetry-exporter-jaeger-thrift/src/opentelemetry/exporter/jaeger/thrift/version.py index 16f468f525c..b1fba7a3e4c 100644 --- a/exporter/opentelemetry-exporter-jaeger-thrift/src/opentelemetry/exporter/jaeger/thrift/version.py +++ b/exporter/opentelemetry-exporter-jaeger-thrift/src/opentelemetry/exporter/jaeger/thrift/version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. -__version__ = "1.14.0-dev" +__version__ = "1.14.0.dev" diff --git a/exporter/opentelemetry-exporter-jaeger/src/opentelemetry/exporter/jaeger/version.py b/exporter/opentelemetry-exporter-jaeger/src/opentelemetry/exporter/jaeger/version.py index 16f468f525c..b1fba7a3e4c 100644 --- a/exporter/opentelemetry-exporter-jaeger/src/opentelemetry/exporter/jaeger/version.py +++ b/exporter/opentelemetry-exporter-jaeger/src/opentelemetry/exporter/jaeger/version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. -__version__ = "1.14.0-dev" +__version__ = "1.14.0.dev" diff --git a/exporter/opentelemetry-exporter-opencensus/src/opentelemetry/exporter/opencensus/version.py b/exporter/opentelemetry-exporter-opencensus/src/opentelemetry/exporter/opencensus/version.py index eece17ed3dc..7bcf6c0a7ba 100644 --- a/exporter/opentelemetry-exporter-opencensus/src/opentelemetry/exporter/opencensus/version.py +++ b/exporter/opentelemetry-exporter-opencensus/src/opentelemetry/exporter/opencensus/version.py @@ -12,4 +12,4 @@ # See the License for the specific language governing permissions and # limitations under the License. -__version__ = "0.35b0-dev" +__version__ = "0.35b0.dev" diff --git a/exporter/opentelemetry-exporter-otlp-proto-grpc/src/opentelemetry/exporter/otlp/proto/grpc/version.py b/exporter/opentelemetry-exporter-otlp-proto-grpc/src/opentelemetry/exporter/otlp/proto/grpc/version.py index bfd387c0b5b..f3bc9d478d6 100644 --- a/exporter/opentelemetry-exporter-otlp-proto-grpc/src/opentelemetry/exporter/otlp/proto/grpc/version.py +++ b/exporter/opentelemetry-exporter-otlp-proto-grpc/src/opentelemetry/exporter/otlp/proto/grpc/version.py @@ -12,4 +12,4 @@ # See the License for the specific language governing permissions and # limitations under the License. -__version__ = "1.14.0-dev" +__version__ = "1.14.0.dev" diff --git a/exporter/opentelemetry-exporter-otlp-proto-http/src/opentelemetry/exporter/otlp/proto/http/version.py b/exporter/opentelemetry-exporter-otlp-proto-http/src/opentelemetry/exporter/otlp/proto/http/version.py index bfd387c0b5b..f3bc9d478d6 100644 --- a/exporter/opentelemetry-exporter-otlp-proto-http/src/opentelemetry/exporter/otlp/proto/http/version.py +++ b/exporter/opentelemetry-exporter-otlp-proto-http/src/opentelemetry/exporter/otlp/proto/http/version.py @@ -12,4 +12,4 @@ # See the License for the specific language governing permissions and # limitations under the License. -__version__ = "1.14.0-dev" +__version__ = "1.14.0.dev" diff --git a/exporter/opentelemetry-exporter-otlp/src/opentelemetry/exporter/otlp/version.py b/exporter/opentelemetry-exporter-otlp/src/opentelemetry/exporter/otlp/version.py index bfd387c0b5b..f3bc9d478d6 100644 --- a/exporter/opentelemetry-exporter-otlp/src/opentelemetry/exporter/otlp/version.py +++ b/exporter/opentelemetry-exporter-otlp/src/opentelemetry/exporter/otlp/version.py @@ -12,4 +12,4 @@ # See the License for the specific language governing permissions and # limitations under the License. -__version__ = "1.14.0-dev" +__version__ = "1.14.0.dev" diff --git a/exporter/opentelemetry-exporter-prometheus/src/opentelemetry/exporter/prometheus/version.py b/exporter/opentelemetry-exporter-prometheus/src/opentelemetry/exporter/prometheus/version.py index eece17ed3dc..7bcf6c0a7ba 100644 --- a/exporter/opentelemetry-exporter-prometheus/src/opentelemetry/exporter/prometheus/version.py +++ b/exporter/opentelemetry-exporter-prometheus/src/opentelemetry/exporter/prometheus/version.py @@ -12,4 +12,4 @@ # See the License for the specific language governing permissions and # limitations under the License. -__version__ = "0.35b0-dev" +__version__ = "0.35b0.dev" diff --git a/exporter/opentelemetry-exporter-zipkin-json/src/opentelemetry/exporter/zipkin/json/version.py b/exporter/opentelemetry-exporter-zipkin-json/src/opentelemetry/exporter/zipkin/json/version.py index bfd387c0b5b..f3bc9d478d6 100644 --- a/exporter/opentelemetry-exporter-zipkin-json/src/opentelemetry/exporter/zipkin/json/version.py +++ b/exporter/opentelemetry-exporter-zipkin-json/src/opentelemetry/exporter/zipkin/json/version.py @@ -12,4 +12,4 @@ # See the License for the specific language governing permissions and # limitations under the License. -__version__ = "1.14.0-dev" +__version__ = "1.14.0.dev" diff --git a/exporter/opentelemetry-exporter-zipkin-proto-http/src/opentelemetry/exporter/zipkin/proto/http/version.py b/exporter/opentelemetry-exporter-zipkin-proto-http/src/opentelemetry/exporter/zipkin/proto/http/version.py index bfd387c0b5b..f3bc9d478d6 100644 --- a/exporter/opentelemetry-exporter-zipkin-proto-http/src/opentelemetry/exporter/zipkin/proto/http/version.py +++ b/exporter/opentelemetry-exporter-zipkin-proto-http/src/opentelemetry/exporter/zipkin/proto/http/version.py @@ -12,4 +12,4 @@ # See the License for the specific language governing permissions and # limitations under the License. -__version__ = "1.14.0-dev" +__version__ = "1.14.0.dev" diff --git a/exporter/opentelemetry-exporter-zipkin/src/opentelemetry/exporter/zipkin/version.py b/exporter/opentelemetry-exporter-zipkin/src/opentelemetry/exporter/zipkin/version.py index bfd387c0b5b..f3bc9d478d6 100644 --- a/exporter/opentelemetry-exporter-zipkin/src/opentelemetry/exporter/zipkin/version.py +++ b/exporter/opentelemetry-exporter-zipkin/src/opentelemetry/exporter/zipkin/version.py @@ -12,4 +12,4 @@ # See the License for the specific language governing permissions and # limitations under the License. -__version__ = "1.14.0-dev" +__version__ = "1.14.0.dev" diff --git a/opentelemetry-api/src/opentelemetry/version.py b/opentelemetry-api/src/opentelemetry/version.py index bfd387c0b5b..f3bc9d478d6 100644 --- a/opentelemetry-api/src/opentelemetry/version.py +++ b/opentelemetry-api/src/opentelemetry/version.py @@ -12,4 +12,4 @@ # See the License for the specific language governing permissions and # limitations under the License. -__version__ = "1.14.0-dev" +__version__ = "1.14.0.dev" diff --git a/opentelemetry-proto/src/opentelemetry/proto/version.py b/opentelemetry-proto/src/opentelemetry/proto/version.py index bfd387c0b5b..f3bc9d478d6 100644 --- a/opentelemetry-proto/src/opentelemetry/proto/version.py +++ b/opentelemetry-proto/src/opentelemetry/proto/version.py @@ -12,4 +12,4 @@ # See the License for the specific language governing permissions and # limitations under the License. -__version__ = "1.14.0-dev" +__version__ = "1.14.0.dev" diff --git a/opentelemetry-sdk/src/opentelemetry/sdk/version.py b/opentelemetry-sdk/src/opentelemetry/sdk/version.py index bfd387c0b5b..f3bc9d478d6 100644 --- a/opentelemetry-sdk/src/opentelemetry/sdk/version.py +++ b/opentelemetry-sdk/src/opentelemetry/sdk/version.py @@ -12,4 +12,4 @@ # See the License for the specific language governing permissions and # limitations under the License. -__version__ = "1.14.0-dev" +__version__ = "1.14.0.dev" diff --git a/opentelemetry-semantic-conventions/src/opentelemetry/semconv/version.py b/opentelemetry-semantic-conventions/src/opentelemetry/semconv/version.py index eece17ed3dc..7bcf6c0a7ba 100644 --- a/opentelemetry-semantic-conventions/src/opentelemetry/semconv/version.py +++ b/opentelemetry-semantic-conventions/src/opentelemetry/semconv/version.py @@ -12,4 +12,4 @@ # See the License for the specific language governing permissions and # limitations under the License. -__version__ = "0.35b0-dev" +__version__ = "0.35b0.dev" diff --git a/propagator/opentelemetry-propagator-b3/src/opentelemetry/propagators/b3/version.py b/propagator/opentelemetry-propagator-b3/src/opentelemetry/propagators/b3/version.py index bfd387c0b5b..f3bc9d478d6 100644 --- a/propagator/opentelemetry-propagator-b3/src/opentelemetry/propagators/b3/version.py +++ b/propagator/opentelemetry-propagator-b3/src/opentelemetry/propagators/b3/version.py @@ -12,4 +12,4 @@ # See the License for the specific language governing permissions and # limitations under the License. -__version__ = "1.14.0-dev" +__version__ = "1.14.0.dev" diff --git a/propagator/opentelemetry-propagator-jaeger/src/opentelemetry/propagators/jaeger/version.py b/propagator/opentelemetry-propagator-jaeger/src/opentelemetry/propagators/jaeger/version.py index bfd387c0b5b..f3bc9d478d6 100644 --- a/propagator/opentelemetry-propagator-jaeger/src/opentelemetry/propagators/jaeger/version.py +++ b/propagator/opentelemetry-propagator-jaeger/src/opentelemetry/propagators/jaeger/version.py @@ -12,4 +12,4 @@ # See the License for the specific language governing permissions and # limitations under the License. -__version__ = "1.14.0-dev" +__version__ = "1.14.0.dev" diff --git a/shim/opentelemetry-opentracing-shim/src/opentelemetry/shim/opentracing_shim/version.py b/shim/opentelemetry-opentracing-shim/src/opentelemetry/shim/opentracing_shim/version.py index eece17ed3dc..7bcf6c0a7ba 100644 --- a/shim/opentelemetry-opentracing-shim/src/opentelemetry/shim/opentracing_shim/version.py +++ b/shim/opentelemetry-opentracing-shim/src/opentelemetry/shim/opentracing_shim/version.py @@ -12,4 +12,4 @@ # See the License for the specific language governing permissions and # limitations under the License. -__version__ = "0.35b0-dev" +__version__ = "0.35b0.dev" diff --git a/tests/opentelemetry-test-utils/src/opentelemetry/test/version.py b/tests/opentelemetry-test-utils/src/opentelemetry/test/version.py index 4bd765ab933..737eebffad6 100644 --- a/tests/opentelemetry-test-utils/src/opentelemetry/test/version.py +++ b/tests/opentelemetry-test-utils/src/opentelemetry/test/version.py @@ -1 +1 @@ -__version__ = "0.35b0-dev" +__version__ = "0.35b0.dev" From 2cabd112e8abae6785919b9371771138f27a4887 Mon Sep 17 00:00:00 2001 From: Trask Stalnaker Date: Fri, 17 Jun 2022 19:57:16 -0700 Subject: [PATCH 35/51] Use python versioning scheme --- .github/workflows/prepare-release-branch.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/prepare-release-branch.yml b/.github/workflows/prepare-release-branch.yml index 70b996b6bbc..23ff1fd8df7 100644 --- a/.github/workflows/prepare-release-branch.yml +++ b/.github/workflows/prepare-release-branch.yml @@ -3,7 +3,7 @@ on: workflow_dispatch: inputs: prerelease_version: - description: "Pre-release version number? (e.g. 1.9.0-rc.2)" + description: "Pre-release version number? (e.g. 1.9.0rc2)" required: false jobs: From e57820f18b5af50e5a5034c91bd57a0001ce3cea Mon Sep 17 00:00:00 2001 From: Trask Stalnaker Date: Fri, 17 Jun 2022 19:58:39 -0700 Subject: [PATCH 36/51] Fix --- .github/workflows/prepare-release-branch.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/prepare-release-branch.yml b/.github/workflows/prepare-release-branch.yml index 23ff1fd8df7..f3fd991f38f 100644 --- a/.github/workflows/prepare-release-branch.yml +++ b/.github/workflows/prepare-release-branch.yml @@ -27,10 +27,10 @@ jobs: fi if [[ ! -z $PRERELEASE_VERSION ]]; then - version=$(.github/scripts/get-version.sh) - version=${version//.dev/} - if [[ $PRERELEASE_VERSION != ${version}* ]]; then - echo "$PRERELEASE_VERSION is not a prerelease for the version on main ($version)" + stable_version=$(./scripts/eachdist.py version --mode stable) + stable_version=${stable_version//.dev/} + if [[ $PRERELEASE_VERSION != ${stable_version}* ]]; then + echo "$PRERELEASE_VERSION is not a prerelease for the version on main ($stable_version)" exit 1 fi fi From 4fb26450ceb68654b9a6f3cb8705ebe7569b9354 Mon Sep 17 00:00:00 2001 From: Trask Stalnaker Date: Fri, 17 Jun 2022 20:40:13 -0700 Subject: [PATCH 37/51] Better explanation of versioning --- RELEASING.md | 38 ++++++++++++++++++++++++++++---------- 1 file changed, 28 insertions(+), 10 deletions(-) diff --git a/RELEASING.md b/RELEASING.md index 468d89bd73e..8ff112bb819 100644 --- a/RELEASING.md +++ b/RELEASING.md @@ -35,16 +35,34 @@ (note that if this is not a patch release then the change log on main may already be up-to-date, in which case no pull request will be created). -## Notes about "pre-releases" - -* Pre-release versions (e.g. `1.9.0rc2`) are supported, and will cause a "short-term" release branch - to be created based on the full version name - (e.g. `release/v1.9.0rc2-0.21b0` instead of a "long-term" release branch name like `release/v1.9.x-0.21bx`). -* Patch releases are not supported on short-term release branches. -* The stable version in `main` in this case will remain the same (e.g. `1.9.0.dev`), since the next release version - (that is not a prereleaes) is still `1.9.0`. -* The unstable version in `main` will be bumped (e.g. `0.22b0.dev`). -* Note that the workflow does not support the concept of a pre-release for unstable artifacts. +## Notes about version numbering for stable components + +* The version number for stable components in the `main` branch is always `X.Y.0.dev`, + where `X.Y.0` represents the next minor release. +* When the release branch is created, you can opt to make a "pre-release", e.g. `X.Y.0rc2`. +* If you ARE NOT making a "pre-release": + * A "long-term" release branch will be created, e.g. `release/v1.9.x-0.21bx` (notice the wildcard x's), + and after the release you can backport PRs to the release branch and make patch releases from it. + * The version number for stable components in the release branch will be bumped to remove the `.dev`, + e.g. `X.Y.0`. + * The version number for stable components in the `main` branch will be bumped to the next version, + e.g. `X.{Y+1}.0.dev`. +* If you ARE making a "pre-release": + * A "short-term" release branch will be created, e.g. `release/v1.9.0rc2-0.21b0` (notice the precise version with + no wildcard x's), which does not support backports or patch releases. + * The version number for stable components in the `main` branch will not be bumped e.g. it will remain `X.Y.0.dev`. + +## Notes about version numbering for unstable components + +* The version number for unstable components in the `main` branch is always `0.Yb0.dev`, + where `0.Yb0` represents the next minor release. + * _Question: Is "b" (beta) redundant on "0." releases, or is this a python thing? I'm wondering if we can change it to `0.Y.0` to match up with practice in js and go repos._ +* Unstable components do not need "pre-releases", and so whether or not you are making a "pre-release" of stable + components: + * The version number for unstable components in the release branch will be bumped to remove the `.dev`, + e.g. `0.Yb0`. + * The version number for unstable components in the `main` branch will be bumped to the next version, + e.g. `0.{Y+1}b0.dev`. ## After the release From 735a661f4cc0885f301a4b4ce4ce4914b6f2feaa Mon Sep 17 00:00:00 2001 From: Trask Stalnaker Date: Fri, 17 Jun 2022 20:44:34 -0700 Subject: [PATCH 38/51] wording --- RELEASING.md | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/RELEASING.md b/RELEASING.md index 8ff112bb819..c4305e27309 100644 --- a/RELEASING.md +++ b/RELEASING.md @@ -41,15 +41,16 @@ where `X.Y.0` represents the next minor release. * When the release branch is created, you can opt to make a "pre-release", e.g. `X.Y.0rc2`. * If you ARE NOT making a "pre-release": - * A "long-term" release branch will be created, e.g. `release/v1.9.x-0.21bx` (notice the wildcard x's), - and after the release you can backport PRs to the release branch and make patch releases from it. + * A "long-term" release branch will be created, e.g. `release/v1.9.x-0.21bx` (notice the wildcard x's). + Later on, after the initial release, you can backport PRs to a "long-term" release branch and make patch releases + from it. * The version number for stable components in the release branch will be bumped to remove the `.dev`, e.g. `X.Y.0`. * The version number for stable components in the `main` branch will be bumped to the next version, e.g. `X.{Y+1}.0.dev`. * If you ARE making a "pre-release": - * A "short-term" release branch will be created, e.g. `release/v1.9.0rc2-0.21b0` (notice the precise version with - no wildcard x's), which does not support backports or patch releases. + * A "short-term" release branch will be created, e.g. `release/v1.9.0rc2-0.21b0` (notice the precise version with no + wildcard x's). "Short-term" release branches do not support backports or patch releases after the initial release. * The version number for stable components in the `main` branch will not be bumped e.g. it will remain `X.Y.0.dev`. ## Notes about version numbering for unstable components From e274ece585ce6ceab524bfec625260f195a3d69a Mon Sep 17 00:00:00 2001 From: Trask Stalnaker Date: Fri, 17 Jun 2022 20:48:45 -0700 Subject: [PATCH 39/51] wording --- RELEASING.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/RELEASING.md b/RELEASING.md index c4305e27309..21adcce02f3 100644 --- a/RELEASING.md +++ b/RELEASING.md @@ -51,13 +51,14 @@ * If you ARE making a "pre-release": * A "short-term" release branch will be created, e.g. `release/v1.9.0rc2-0.21b0` (notice the precise version with no wildcard x's). "Short-term" release branches do not support backports or patch releases after the initial release. - * The version number for stable components in the `main` branch will not be bumped e.g. it will remain `X.Y.0.dev`. + * The version number for stable components in the `main` branch will not be bumped, e.g. it will remain `X.Y.0.dev` + since the next minor release will still be `X.Y.0`. ## Notes about version numbering for unstable components * The version number for unstable components in the `main` branch is always `0.Yb0.dev`, where `0.Yb0` represents the next minor release. - * _Question: Is "b" (beta) redundant on "0." releases, or is this a python thing? I'm wondering if we can change it to `0.Y.0` to match up with practice in js and go repos._ + * _Question: Is "b" (beta) redundant on "0." releases, or is this a python thing? I'm wondering if we can change it to `0.Y.0` to match up with the practice in js and go repos._ * Unstable components do not need "pre-releases", and so whether or not you are making a "pre-release" of stable components: * The version number for unstable components in the release branch will be bumped to remove the `.dev`, From 4916054be35be14c5c46d6fe50e3645cff1f43d7 Mon Sep 17 00:00:00 2001 From: Trask Stalnaker Date: Sat, 18 Jun 2022 19:35:47 -0700 Subject: [PATCH 40/51] Inline set-git-user.sh --- .github/scripts/set-git-user.sh | 4 ---- .github/workflows/backport.yml | 4 +++- .github/workflows/prepare-patch-release.yml | 4 +++- .github/workflows/prepare-release-branch.yml | 8 ++++++-- .github/workflows/release.yml | 4 +++- 5 files changed, 15 insertions(+), 9 deletions(-) delete mode 100755 .github/scripts/set-git-user.sh diff --git a/.github/scripts/set-git-user.sh b/.github/scripts/set-git-user.sh deleted file mode 100755 index a4c68b0e308..00000000000 --- a/.github/scripts/set-git-user.sh +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/bash -e - -git config user.name opentelemetrybot -git config user.email 107717825+opentelemetrybot@users.noreply.github.com diff --git a/.github/workflows/backport.yml b/.github/workflows/backport.yml index 038d48afb29..b271524e0bf 100644 --- a/.github/workflows/backport.yml +++ b/.github/workflows/backport.yml @@ -22,7 +22,9 @@ jobs: fetch-depth: 0 - name: Set git user - run: .github/scripts/set-git-user.sh + run: | + git config user.name opentelemetrybot + git config user.email 107717825+opentelemetrybot@users.noreply.github.com - name: Create pull request env: diff --git a/.github/workflows/prepare-patch-release.yml b/.github/workflows/prepare-patch-release.yml index 80656064c9c..27fac03de93 100644 --- a/.github/workflows/prepare-patch-release.yml +++ b/.github/workflows/prepare-patch-release.yml @@ -56,7 +56,9 @@ jobs: sed -Ei "s/^## Unreleased$/## Version ${VERSION/\//\\\/} ($date)/" CHANGELOG.md - name: Set git user - run: .github/scripts/set-git-user.sh + run: | + git config user.name opentelemetrybot + git config user.email 107717825+opentelemetrybot@users.noreply.github.com - name: Create pull request env: diff --git a/.github/workflows/prepare-release-branch.yml b/.github/workflows/prepare-release-branch.yml index f3fd991f38f..ca6c0ab3d8a 100644 --- a/.github/workflows/prepare-release-branch.yml +++ b/.github/workflows/prepare-release-branch.yml @@ -83,7 +83,9 @@ jobs: sed -Ei "s/^## Unreleased$/## Version ${VERSION/\//\\\/} ($date)/" CHANGELOG.md - name: Set git user - run: .github/scripts/set-git-user.sh + run: | + git config user.name opentelemetrybot + git config user.email 107717825+opentelemetrybot@users.noreply.github.com - name: Create pull request against the release branch env: @@ -158,7 +160,9 @@ jobs: sed -Ei "s/^## Unreleased$/## Unreleased\n\n## Version ${VERSION/\//\\\/} ($date)/" CHANGELOG.md - name: Set git user - run: .github/scripts/set-git-user.sh + run: | + git config user.name opentelemetrybot + git config user.email 107717825+opentelemetrybot@users.noreply.github.com - name: Create pull request against main env: diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index ef17655a15a..55ca43c1c01 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -180,7 +180,9 @@ jobs: fi - name: Set git user - run: .github/scripts/set-git-user.sh + run: | + git config user.name opentelemetrybot + git config user.email 107717825+opentelemetrybot@users.noreply.github.com - name: Create pull request against main env: From 257aef2020641dba42da67c9a9b09e09c3d239c6 Mon Sep 17 00:00:00 2001 From: Trask Stalnaker Date: Sun, 19 Jun 2022 15:32:24 -0700 Subject: [PATCH 41/51] Remove some complexity from sed expressions --- .github/workflows/prepare-patch-release.yml | 7 +++---- .github/workflows/prepare-release-branch.yml | 20 ++++++++++---------- .github/workflows/release.yml | 9 ++++----- 3 files changed, 17 insertions(+), 19 deletions(-) diff --git a/.github/workflows/prepare-patch-release.yml b/.github/workflows/prepare-patch-release.yml index 27fac03de93..f131cef54b6 100644 --- a/.github/workflows/prepare-patch-release.yml +++ b/.github/workflows/prepare-patch-release.yml @@ -45,7 +45,6 @@ jobs: echo "STABLE_VERSION=$stable_version" >> $GITHUB_ENV echo "UNSTABLE_VERSION=$unstable_version" >> $GITHUB_ENV - echo "VERSION=${stable_version}/${unstable_version}" >> $GITHUB_ENV - name: Update version run: .github/scripts/update-version.sh $STABLE_VERSION $UNSTABLE_VERSION @@ -53,7 +52,7 @@ jobs: - name: Update the change log with the approximate release date run: | date=$(date "+%Y-%m-%d") - sed -Ei "s/^## Unreleased$/## Version ${VERSION/\//\\\/} ($date)/" CHANGELOG.md + sed -Ei "s/^## Unreleased$/## Version ${STABLE_VERSION}\/${UNSTABLE_VERSION} ($date)/" CHANGELOG.md - name: Set git user run: | @@ -65,8 +64,8 @@ jobs: # not using secrets.GITHUB_TOKEN since pull requests from that token do not run workflows GITHUB_TOKEN: ${{ secrets.BOT_TOKEN }} run: | - message="Prepare release ${VERSION}" - branch="prepare-release-${VERSION/\//-}" + message="Prepare release ${STABLE_VERSION}/${UNSTABLE_VERSION}" + branch="prepare-release-${STABLE_VERSION}-${UNSTABLE_VERSION}" git commit -a -m "$message" git push origin HEAD:$branch diff --git a/.github/workflows/prepare-release-branch.yml b/.github/workflows/prepare-release-branch.yml index ca6c0ab3d8a..fbfd7456ea2 100644 --- a/.github/workflows/prepare-release-branch.yml +++ b/.github/workflows/prepare-release-branch.yml @@ -71,7 +71,6 @@ jobs: echo "STABLE_VERSION=$stable_version" >> $GITHUB_ENV echo "UNSTABLE_VERSION=$unstable_version" >> $GITHUB_ENV - echo "VERSION=${stable_version}/${unstable_version}" >> $GITHUB_ENV echo "RELEASE_BRANCH_NAME=$release_branch_name" >> $GITHUB_ENV - name: Update version @@ -80,7 +79,7 @@ jobs: - name: Update the change log with the approximate release date run: | date=$(date "+%Y-%m-%d") - sed -Ei "s/^## Unreleased$/## Version ${VERSION/\//\\\/} ($date)/" CHANGELOG.md + sed -Ei "s/^## Unreleased$/## Version ${STABLE_VERSION}\/${UNSTABLE_VERSION} ($date)/" CHANGELOG.md - name: Set git user run: | @@ -92,8 +91,8 @@ jobs: # not using secrets.GITHUB_TOKEN since pull requests from that token do not run workflows GITHUB_TOKEN: ${{ secrets.BOT_TOKEN }} run: | - message="Prepare release ${VERSION}" - branch="prepare-release-${VERSION/\//-}" + message="Prepare release ${STABLE_VERSION}/${UNSTABLE_VERSION}" + branch="prepare-release-${STABLE_VERSION}-${UNSTABLE_VERSION}" git commit -a -m "$message" git push origin HEAD:$branch @@ -145,10 +144,11 @@ jobs: unstable_next_version="0.$((unstable_minor + 1))b0" + echo "STABLE_VERSION=${stable_version}" >> $GITHUB_ENV echo "STABLE_NEXT_VERSION=${stable_next_version}.dev" >> $GITHUB_ENV + + echo "UNSTABLE_VERSION=${unstable_version}" >> $GITHUB_ENV echo "UNSTABLE_NEXT_VERSION=${unstable_next_version}.dev" >> $GITHUB_ENV - echo "NEXT_VERSION=${stable_next_version}.dev/${unstable_next_version}.dev" >> $GITHUB_ENV - echo "VERSION=${stable_version}/${unstable_version}" >> $GITHUB_ENV - name: Update version run: .github/scripts/update-version.sh $STABLE_NEXT_VERSION $UNSTABLE_NEXT_VERSION @@ -157,7 +157,7 @@ jobs: run: | # the actual release date on main will be updated at the end of the release workflow date=$(date "+%Y-%m-%d") - sed -Ei "s/^## Unreleased$/## Unreleased\n\n## Version ${VERSION/\//\\\/} ($date)/" CHANGELOG.md + sed -Ei "s/^## Unreleased$/## Unreleased\n\n## Version ${STABLE_VERSION}\/${UNSTABLE_VERSION} ($date)/" CHANGELOG.md - name: Set git user run: | @@ -169,9 +169,9 @@ jobs: # not using secrets.GITHUB_TOKEN since pull requests from that token do not run workflows GITHUB_TOKEN: ${{ secrets.BOT_TOKEN }} run: | - message="Update version to ${NEXT_VERSION}" - body="Update version to \`${NEXT_VERSION}\`." - branch="update-version-to-${NEXT_VERSION/\//-}" + message="Update version to ${STABLE_NEXT_VERSION}/${UNSTABLE_VERSION}" + body="Update version to \`${STABLE_NEXT_VERSION}/${UNSTABLE_VERSION}\`." + branch="update-version-to-${STABLE_NEXT_VERSION}-${UNSTABLE_VERSION}" git commit -a -m "$message" git push origin HEAD:$branch diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 55ca43c1c01..b68f627b57a 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -42,7 +42,6 @@ jobs: echo "STABLE_VERSION=$stable_version" >> $GITHUB_ENV echo "UNSTABLE_VERSION=$unstable_version" >> $GITHUB_ENV - echo "VERSION=${stable_version}/${unstable_version}" >> $GITHUB_ENV echo "PRIOR_VERSION_WHEN_PATCH=$prior_version_when_patch" >> $GITHUB_ENV @@ -110,7 +109,7 @@ jobs: # CHANGELOG_SECTION.md is also used at the end of the release workflow # for copying the change log updates to main - sed -n "0,/^## Version ${VERSION/\//\\\/} /d;/^## Version /q;p" CHANGELOG.md \ + sed -n "0,/^## Version ${STABLE_VERSION}\/${UNSTABLE_VERSION} /d;/^## Version /q;p" CHANGELOG.md \ > /tmp/CHANGELOG_SECTION.md # the complex perl regex is needed because markdown docs render newlines as soft wraps @@ -142,19 +141,19 @@ jobs: # update the release date date=$(gh release view v$STABLE_VERSION --json publishedAt --jq .publishedAt | sed 's/T.*//') - sed -Ei "s/## Version ${VERSION/\//\\\/} .*/## Version ${VERSION/\//\\\/} ($date)/" CHANGELOG.md + sed -Ei "s/## Version ${STABLE_VERSION}\/${UNSTABLE_VERSION} .*/## Version ${STABLE_VERSION}\/${UNSTABLE_VERSION} ($date)/" CHANGELOG.md # the entries are copied over from the release branch to support workflows # where change log entries may be updated after preparing the release branch # copy the portion above the release, up to and including the heading - sed -n "0,/^## Version ${VERSION/\//\\\/} ($date)/p" CHANGELOG.md > /tmp/CHANGELOG.md + sed -n "0,/^## Version ${STABLE_VERSION}\/${UNSTABLE_VERSION} ($date)/p" CHANGELOG.md > /tmp/CHANGELOG.md # copy the release notes cat /tmp/CHANGELOG_SECTION.md >> /tmp/CHANGELOG.md # copy the portion below the release - sed -n "0,/^## Version ${VERSION/\//\\\/} /d;0,/^## Version /{/^## Version/!d};p" CHANGELOG.md \ + sed -n "0,/^## Version ${STABLE_VERSION}\/${UNSTABLE_VERSION} /d;0,/^## Version /{/^## Version/!d};p" CHANGELOG.md \ >> /tmp/CHANGELOG.md # update the real CHANGELOG.md From f013d2ed7814bc1483e2e8419fc78acfd60b3e17 Mon Sep 17 00:00:00 2001 From: Trask Stalnaker Date: Sat, 6 Aug 2022 14:47:29 -0700 Subject: [PATCH 42/51] extract script for bot account setup --- .github/scripts/use-cla-approved-github-bot.sh | 4 ++++ .github/workflows/backport.yml | 6 ++---- .github/workflows/prepare-patch-release.yml | 6 ++---- .github/workflows/prepare-release-branch.yml | 12 ++++-------- .github/workflows/release.yml | 6 ++---- 5 files changed, 14 insertions(+), 20 deletions(-) create mode 100644 .github/scripts/use-cla-approved-github-bot.sh diff --git a/.github/scripts/use-cla-approved-github-bot.sh b/.github/scripts/use-cla-approved-github-bot.sh new file mode 100644 index 00000000000..a4c68b0e308 --- /dev/null +++ b/.github/scripts/use-cla-approved-github-bot.sh @@ -0,0 +1,4 @@ +#!/bin/bash -e + +git config user.name opentelemetrybot +git config user.email 107717825+opentelemetrybot@users.noreply.github.com diff --git a/.github/workflows/backport.yml b/.github/workflows/backport.yml index b271524e0bf..1284c646ca2 100644 --- a/.github/workflows/backport.yml +++ b/.github/workflows/backport.yml @@ -21,10 +21,8 @@ jobs: # history is needed to run git cherry-pick below fetch-depth: 0 - - name: Set git user - run: | - git config user.name opentelemetrybot - git config user.email 107717825+opentelemetrybot@users.noreply.github.com + - name: Use CLA approved github bot + run: .github/scripts/use-cla-approved-github-bot.sh - name: Create pull request env: diff --git a/.github/workflows/prepare-patch-release.yml b/.github/workflows/prepare-patch-release.yml index f131cef54b6..75676ada042 100644 --- a/.github/workflows/prepare-patch-release.yml +++ b/.github/workflows/prepare-patch-release.yml @@ -54,10 +54,8 @@ jobs: date=$(date "+%Y-%m-%d") sed -Ei "s/^## Unreleased$/## Version ${STABLE_VERSION}\/${UNSTABLE_VERSION} ($date)/" CHANGELOG.md - - name: Set git user - run: | - git config user.name opentelemetrybot - git config user.email 107717825+opentelemetrybot@users.noreply.github.com + - name: Use CLA approved github bot + run: .github/scripts/use-cla-approved-github-bot.sh - name: Create pull request env: diff --git a/.github/workflows/prepare-release-branch.yml b/.github/workflows/prepare-release-branch.yml index fbfd7456ea2..4881faf8e9e 100644 --- a/.github/workflows/prepare-release-branch.yml +++ b/.github/workflows/prepare-release-branch.yml @@ -81,10 +81,8 @@ jobs: date=$(date "+%Y-%m-%d") sed -Ei "s/^## Unreleased$/## Version ${STABLE_VERSION}\/${UNSTABLE_VERSION} ($date)/" CHANGELOG.md - - name: Set git user - run: | - git config user.name opentelemetrybot - git config user.email 107717825+opentelemetrybot@users.noreply.github.com + - name: Use CLA approved github bot + run: .github/scripts/use-cla-approved-github-bot.sh - name: Create pull request against the release branch env: @@ -159,10 +157,8 @@ jobs: date=$(date "+%Y-%m-%d") sed -Ei "s/^## Unreleased$/## Unreleased\n\n## Version ${STABLE_VERSION}\/${UNSTABLE_VERSION} ($date)/" CHANGELOG.md - - name: Set git user - run: | - git config user.name opentelemetrybot - git config user.email 107717825+opentelemetrybot@users.noreply.github.com + - name: Use CLA approved github bot + run: .github/scripts/use-cla-approved-github-bot.sh - name: Create pull request against main env: diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index b68f627b57a..835fc45857b 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -178,10 +178,8 @@ jobs: cp /tmp/CHANGELOG.md CHANGELOG.md fi - - name: Set git user - run: | - git config user.name opentelemetrybot - git config user.email 107717825+opentelemetrybot@users.noreply.github.com + - name: Use CLA approved github bot + run: .github/scripts/use-cla-approved-github-bot.sh - name: Create pull request against main env: From 7390e960ab2af994618fbd470e525585f38ed1b9 Mon Sep 17 00:00:00 2001 From: Trask Stalnaker Date: Sat, 6 Aug 2022 14:50:00 -0700 Subject: [PATCH 43/51] Update --- .github/workflows/changelog.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/changelog.yml b/.github/workflows/changelog.yml index 50404bd538d..5238e01c4b5 100644 --- a/.github/workflows/changelog.yml +++ b/.github/workflows/changelog.yml @@ -13,10 +13,9 @@ on: jobs: changelog: runs-on: ubuntu-latest - # TODO update with opentelemetry-python-bot or a shared otel bot if: | !contains(github.event.pull_request.labels.*.name, 'Skip Changelog') - && github.actor != 'opentelemetry-java-bot' + && github.actor != 'opentelemetrybot' steps: - uses: actions/checkout@v2 From ce140cfc11cc02bb118f9c5662b05a6abbe9468c Mon Sep 17 00:00:00 2001 From: Trask Stalnaker Date: Sun, 23 Oct 2022 13:53:24 -0700 Subject: [PATCH 44/51] chmod --- .github/scripts/use-cla-approved-github-bot.sh | 0 1 file changed, 0 insertions(+), 0 deletions(-) mode change 100644 => 100755 .github/scripts/use-cla-approved-github-bot.sh diff --git a/.github/scripts/use-cla-approved-github-bot.sh b/.github/scripts/use-cla-approved-github-bot.sh old mode 100644 new mode 100755 From 7dd9c714ca89a37e2632d4840f8e686c06c04346 Mon Sep 17 00:00:00 2001 From: Trask Stalnaker Date: Sun, 23 Oct 2022 13:56:13 -0700 Subject: [PATCH 45/51] Fix PR title --- .github/workflows/prepare-release-branch.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/prepare-release-branch.yml b/.github/workflows/prepare-release-branch.yml index 4881faf8e9e..94fba08fc6b 100644 --- a/.github/workflows/prepare-release-branch.yml +++ b/.github/workflows/prepare-release-branch.yml @@ -165,9 +165,9 @@ jobs: # not using secrets.GITHUB_TOKEN since pull requests from that token do not run workflows GITHUB_TOKEN: ${{ secrets.BOT_TOKEN }} run: | - message="Update version to ${STABLE_NEXT_VERSION}/${UNSTABLE_VERSION}" - body="Update version to \`${STABLE_NEXT_VERSION}/${UNSTABLE_VERSION}\`." - branch="update-version-to-${STABLE_NEXT_VERSION}-${UNSTABLE_VERSION}" + message="Update version to ${STABLE_NEXT_VERSION}/${UNSTABLE_NEXT_VERSION}" + body="Update version to \`${STABLE_NEXT_VERSION}/${UNSTABLE_NEXT_VERSION}\`." + branch="update-version-to-${STABLE_NEXT_VERSION}-${UNSTABLE_NEXT_VERSION}" git commit -a -m "$message" git push origin HEAD:$branch From 1cf800e3fbc7438ba9be6fa3531c816dd1a7a951 Mon Sep 17 00:00:00 2001 From: Trask Stalnaker Date: Sun, 23 Oct 2022 14:01:47 -0700 Subject: [PATCH 46/51] Sync versions --- exporter/opentelemetry-exporter-jaeger/pyproject.toml | 4 ++-- .../opentelemetry-exporter-otlp-proto-grpc/pyproject.toml | 2 +- .../opentelemetry-exporter-otlp-proto-http/pyproject.toml | 2 +- exporter/opentelemetry-exporter-otlp/pyproject.toml | 4 ++-- .../opentelemetry-exporter-zipkin-proto-http/pyproject.toml | 2 +- exporter/opentelemetry-exporter-zipkin/pyproject.toml | 4 ++-- opentelemetry-sdk/pyproject.toml | 4 ++-- shim/opentelemetry-opentracing-shim/pyproject.toml | 2 +- tests/opentelemetry-test-utils/pyproject.toml | 4 ++-- 9 files changed, 14 insertions(+), 14 deletions(-) diff --git a/exporter/opentelemetry-exporter-jaeger/pyproject.toml b/exporter/opentelemetry-exporter-jaeger/pyproject.toml index 3f7cf695b05..a9b56afe5f3 100644 --- a/exporter/opentelemetry-exporter-jaeger/pyproject.toml +++ b/exporter/opentelemetry-exporter-jaeger/pyproject.toml @@ -25,8 +25,8 @@ classifiers = [ "Typing :: Typed", ] dependencies = [ - "opentelemetry-exporter-jaeger-proto-grpc == 1.13.0", - "opentelemetry-exporter-jaeger-thrift == 1.13.0", + "opentelemetry-exporter-jaeger-proto-grpc == 1.14.0.dev", + "opentelemetry-exporter-jaeger-thrift == 1.14.0.dev", ] [project.optional-dependencies] diff --git a/exporter/opentelemetry-exporter-otlp-proto-grpc/pyproject.toml b/exporter/opentelemetry-exporter-otlp-proto-grpc/pyproject.toml index bf7a261d9fa..3f603d3ebde 100644 --- a/exporter/opentelemetry-exporter-otlp-proto-grpc/pyproject.toml +++ b/exporter/opentelemetry-exporter-otlp-proto-grpc/pyproject.toml @@ -29,7 +29,7 @@ dependencies = [ "googleapis-common-protos ~= 1.52", "grpcio >= 1.0.0, < 2.0.0", "opentelemetry-api ~= 1.12", - "opentelemetry-proto == 1.13.0", + "opentelemetry-proto == 1.14.0.dev", "opentelemetry-sdk ~= 1.12", ] diff --git a/exporter/opentelemetry-exporter-otlp-proto-http/pyproject.toml b/exporter/opentelemetry-exporter-otlp-proto-http/pyproject.toml index edfc307c174..621a076a2a5 100644 --- a/exporter/opentelemetry-exporter-otlp-proto-http/pyproject.toml +++ b/exporter/opentelemetry-exporter-otlp-proto-http/pyproject.toml @@ -28,7 +28,7 @@ dependencies = [ "backoff >= 1.10.0, < 3.0.0; python_version>='3.7'", "googleapis-common-protos ~= 1.52", "opentelemetry-api ~= 1.12", - "opentelemetry-proto == 1.13.0", + "opentelemetry-proto == 1.14.0.dev", "opentelemetry-sdk ~= 1.12", "requests ~= 2.7", ] diff --git a/exporter/opentelemetry-exporter-otlp/pyproject.toml b/exporter/opentelemetry-exporter-otlp/pyproject.toml index 0f3936ad577..ead4a6b25cc 100644 --- a/exporter/opentelemetry-exporter-otlp/pyproject.toml +++ b/exporter/opentelemetry-exporter-otlp/pyproject.toml @@ -25,8 +25,8 @@ classifiers = [ "Typing :: Typed", ] dependencies = [ - "opentelemetry-exporter-otlp-proto-grpc == 1.13.0", - "opentelemetry-exporter-otlp-proto-http == 1.13.0", + "opentelemetry-exporter-otlp-proto-grpc == 1.14.0.dev", + "opentelemetry-exporter-otlp-proto-http == 1.14.0.dev", ] [project.entry-points.opentelemetry_logs_exporter] diff --git a/exporter/opentelemetry-exporter-zipkin-proto-http/pyproject.toml b/exporter/opentelemetry-exporter-zipkin-proto-http/pyproject.toml index eb5bde04401..8d65405f903 100644 --- a/exporter/opentelemetry-exporter-zipkin-proto-http/pyproject.toml +++ b/exporter/opentelemetry-exporter-zipkin-proto-http/pyproject.toml @@ -26,7 +26,7 @@ classifiers = [ ] dependencies = [ "opentelemetry-api ~= 1.3", - "opentelemetry-exporter-zipkin-json == 1.13.0", + "opentelemetry-exporter-zipkin-json == 1.14.0.dev", "opentelemetry-sdk ~= 1.11", "protobuf ~= 3.12", "requests ~= 2.7", diff --git a/exporter/opentelemetry-exporter-zipkin/pyproject.toml b/exporter/opentelemetry-exporter-zipkin/pyproject.toml index 76cac43f4bc..575c9166241 100644 --- a/exporter/opentelemetry-exporter-zipkin/pyproject.toml +++ b/exporter/opentelemetry-exporter-zipkin/pyproject.toml @@ -25,8 +25,8 @@ classifiers = [ "Typing :: Typed", ] dependencies = [ - "opentelemetry-exporter-zipkin-json == 1.13.0", - "opentelemetry-exporter-zipkin-proto-http == 1.13.0", + "opentelemetry-exporter-zipkin-json == 1.14.0.dev", + "opentelemetry-exporter-zipkin-proto-http == 1.14.0.dev", ] [project.optional-dependencies] diff --git a/opentelemetry-sdk/pyproject.toml b/opentelemetry-sdk/pyproject.toml index 9b106b83f81..93beabde008 100644 --- a/opentelemetry-sdk/pyproject.toml +++ b/opentelemetry-sdk/pyproject.toml @@ -25,8 +25,8 @@ classifiers = [ "Typing :: Typed", ] dependencies = [ - "opentelemetry-api == 1.13.0", - "opentelemetry-semantic-conventions == 0.34b0", + "opentelemetry-api == 1.14.0.dev", + "opentelemetry-semantic-conventions == 0.35b0.dev", "setuptools >= 16.0", "typing-extensions >= 3.7.4", ] diff --git a/shim/opentelemetry-opentracing-shim/pyproject.toml b/shim/opentelemetry-opentracing-shim/pyproject.toml index 46ba16884ec..42537bbd466 100644 --- a/shim/opentelemetry-opentracing-shim/pyproject.toml +++ b/shim/opentelemetry-opentracing-shim/pyproject.toml @@ -32,7 +32,7 @@ dependencies = [ [project.optional-dependencies] test = [ - "opentelemetry-test-utils == 0.34b0", + "opentelemetry-test-utils == 0.35b0.dev", "opentracing ~= 2.2.0", ] diff --git a/tests/opentelemetry-test-utils/pyproject.toml b/tests/opentelemetry-test-utils/pyproject.toml index e4307e16f64..eaf2d692077 100644 --- a/tests/opentelemetry-test-utils/pyproject.toml +++ b/tests/opentelemetry-test-utils/pyproject.toml @@ -25,8 +25,8 @@ classifiers = [ ] dependencies = [ "asgiref ~= 3.0", - "opentelemetry-api == 1.13.0", - "opentelemetry-sdk == 1.13.0", + "opentelemetry-api == 1.14.0.dev", + "opentelemetry-sdk == 1.14.0.dev", ] [project.optional-dependencies] From 213ee54f73eb5e1d2aea4f9f61a9023304db05f6 Mon Sep 17 00:00:00 2001 From: Trask Stalnaker Date: Sun, 23 Oct 2022 15:46:22 -0700 Subject: [PATCH 47/51] Fix release script --- .github/workflows/release.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 835fc45857b..d1be822e1a1 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -54,7 +54,7 @@ jobs: - run: | if [[ -z $PRIOR_VERSION_WHEN_PATCH ]]; then # not making a patch release - if ! grep --quiet "^## Version $VERSION " CHANGELOG.md; then + if ! grep --quiet "^## Version ${STABLE_VERSION}/${UNSTABLE_VERSION} " CHANGELOG.md; then echo the pull request generated by prepare-release-branch.yml needs to be merged first exit 1 fi @@ -122,7 +122,7 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | gh release create --target $GITHUB_REF_NAME \ - --title "Version $VERSION" \ + --title "Version ${STABLE_VERSION}/${UNSTABLE_VERSION}" \ --notes-file /tmp/release-notes.txt \ --discussion-category announcements \ v$STABLE_VERSION @@ -166,7 +166,7 @@ jobs: # add the heading date=$(gh release view v$STABLE_VERSION --json publishedAt --jq .publishedAt | sed 's/T.*//') - echo "## Version $VERSION ($date)" >> /tmp/CHANGELOG.md + echo "## Version ${STABLE_VERSION}/${UNSTABLE_VERSION} ($date)" >> /tmp/CHANGELOG.md # copy the release notes cat /tmp/CHANGELOG_SECTION.md >> /tmp/CHANGELOG.md From bce04a210fe4d58faeccc87c0090013dea848afb Mon Sep 17 00:00:00 2001 From: Trask Stalnaker Date: Sun, 23 Oct 2022 17:38:49 -0700 Subject: [PATCH 48/51] TEMPORARY --- .github/workflows/release.yml | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index d1be822e1a1..f7072839cfe 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -81,19 +81,19 @@ jobs: # rejected by pypi (e.g "3 - Beta"). This would cause a failure during the # middle of the package upload causing the action to fail, and certain packages # might have already been updated, this would be bad. - - name: Publish to TestPyPI - env: - TWINE_USERNAME: '__token__' - TWINE_PASSWORD: ${{ secrets.test_pypi_token }} - run: | - twine upload --repository testpypi --skip-existing --verbose dist/* - - - name: Publish to PyPI - env: - TWINE_USERNAME: '__token__' - TWINE_PASSWORD: ${{ secrets.pypi_password }} - run: | - twine upload --skip-existing --verbose dist/* +# - name: Publish to TestPyPI +# env: +# TWINE_USERNAME: '__token__' +# TWINE_PASSWORD: ${{ secrets.test_pypi_token }} +# run: | +# twine upload --repository testpypi --skip-existing --verbose dist/* +# +# - name: Publish to PyPI +# env: +# TWINE_USERNAME: '__token__' +# TWINE_PASSWORD: ${{ secrets.pypi_password }} +# run: | +# twine upload --skip-existing --verbose dist/* - name: Generate release notes env: From d7f0ade04d30a22e8faa17cdb5b576bb6e667468 Mon Sep 17 00:00:00 2001 From: OpenTelemetry Bot <107717825+opentelemetrybot@users.noreply.github.com> Date: Sun, 23 Oct 2022 18:34:15 -0700 Subject: [PATCH 49/51] Update version to 1.15.0.dev/0.36b0.dev (#102) --- CHANGELOG.md | 2 ++ eachdist.ini | 4 ++-- .../src/opentelemetry/exporter/jaeger/proto/grpc/version.py | 2 +- .../src/opentelemetry/exporter/jaeger/thrift/version.py | 2 +- exporter/opentelemetry-exporter-jaeger/pyproject.toml | 4 ++-- .../src/opentelemetry/exporter/jaeger/version.py | 2 +- .../src/opentelemetry/exporter/opencensus/version.py | 2 +- .../opentelemetry-exporter-otlp-proto-grpc/pyproject.toml | 2 +- .../src/opentelemetry/exporter/otlp/proto/grpc/version.py | 2 +- .../opentelemetry-exporter-otlp-proto-http/pyproject.toml | 2 +- .../src/opentelemetry/exporter/otlp/proto/http/version.py | 2 +- exporter/opentelemetry-exporter-otlp/pyproject.toml | 4 ++-- .../src/opentelemetry/exporter/otlp/version.py | 2 +- .../src/opentelemetry/exporter/prometheus/version.py | 2 +- .../src/opentelemetry/exporter/zipkin/json/version.py | 2 +- .../opentelemetry-exporter-zipkin-proto-http/pyproject.toml | 2 +- .../src/opentelemetry/exporter/zipkin/proto/http/version.py | 2 +- exporter/opentelemetry-exporter-zipkin/pyproject.toml | 4 ++-- .../src/opentelemetry/exporter/zipkin/version.py | 2 +- opentelemetry-api/src/opentelemetry/version.py | 2 +- opentelemetry-proto/src/opentelemetry/proto/version.py | 2 +- opentelemetry-sdk/pyproject.toml | 4 ++-- opentelemetry-sdk/src/opentelemetry/sdk/version.py | 2 +- .../src/opentelemetry/semconv/version.py | 2 +- .../src/opentelemetry/propagators/b3/version.py | 2 +- .../src/opentelemetry/propagators/jaeger/version.py | 2 +- shim/opentelemetry-opentracing-shim/pyproject.toml | 2 +- .../src/opentelemetry/shim/opentracing_shim/version.py | 2 +- tests/opentelemetry-test-utils/pyproject.toml | 4 ++-- .../src/opentelemetry/test/version.py | 2 +- 30 files changed, 37 insertions(+), 35 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 501bc9b480c..39fed48dff6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## Unreleased +## Version 1.14.0/0.35b0 (2022-10-24) + - Update explicit histogram bucket boundaries ([#2947](https://github.com/open-telemetry/opentelemetry-python/pull/2947)) - `exporter-otlp-proto-http`: add user agent string diff --git a/eachdist.ini b/eachdist.ini index 2909ba627b1..40c6db3c180 100644 --- a/eachdist.ini +++ b/eachdist.ini @@ -11,7 +11,7 @@ sortfirst= exporter/* [stable] -version=1.14.0.dev +version=1.15.0.dev packages= opentelemetry-sdk @@ -30,7 +30,7 @@ packages= opentelemetry-api [prerelease] -version=0.35b0.dev +version=0.36b0.dev packages= opentelemetry-opentracing-shim diff --git a/exporter/opentelemetry-exporter-jaeger-proto-grpc/src/opentelemetry/exporter/jaeger/proto/grpc/version.py b/exporter/opentelemetry-exporter-jaeger-proto-grpc/src/opentelemetry/exporter/jaeger/proto/grpc/version.py index b1fba7a3e4c..65fcc50d7d1 100644 --- a/exporter/opentelemetry-exporter-jaeger-proto-grpc/src/opentelemetry/exporter/jaeger/proto/grpc/version.py +++ b/exporter/opentelemetry-exporter-jaeger-proto-grpc/src/opentelemetry/exporter/jaeger/proto/grpc/version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. -__version__ = "1.14.0.dev" +__version__ = "1.15.0.dev" diff --git a/exporter/opentelemetry-exporter-jaeger-thrift/src/opentelemetry/exporter/jaeger/thrift/version.py b/exporter/opentelemetry-exporter-jaeger-thrift/src/opentelemetry/exporter/jaeger/thrift/version.py index b1fba7a3e4c..65fcc50d7d1 100644 --- a/exporter/opentelemetry-exporter-jaeger-thrift/src/opentelemetry/exporter/jaeger/thrift/version.py +++ b/exporter/opentelemetry-exporter-jaeger-thrift/src/opentelemetry/exporter/jaeger/thrift/version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. -__version__ = "1.14.0.dev" +__version__ = "1.15.0.dev" diff --git a/exporter/opentelemetry-exporter-jaeger/pyproject.toml b/exporter/opentelemetry-exporter-jaeger/pyproject.toml index a9b56afe5f3..0d5926f24d4 100644 --- a/exporter/opentelemetry-exporter-jaeger/pyproject.toml +++ b/exporter/opentelemetry-exporter-jaeger/pyproject.toml @@ -25,8 +25,8 @@ classifiers = [ "Typing :: Typed", ] dependencies = [ - "opentelemetry-exporter-jaeger-proto-grpc == 1.14.0.dev", - "opentelemetry-exporter-jaeger-thrift == 1.14.0.dev", + "opentelemetry-exporter-jaeger-proto-grpc == 1.15.0.dev", + "opentelemetry-exporter-jaeger-thrift == 1.15.0.dev", ] [project.optional-dependencies] diff --git a/exporter/opentelemetry-exporter-jaeger/src/opentelemetry/exporter/jaeger/version.py b/exporter/opentelemetry-exporter-jaeger/src/opentelemetry/exporter/jaeger/version.py index b1fba7a3e4c..65fcc50d7d1 100644 --- a/exporter/opentelemetry-exporter-jaeger/src/opentelemetry/exporter/jaeger/version.py +++ b/exporter/opentelemetry-exporter-jaeger/src/opentelemetry/exporter/jaeger/version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. -__version__ = "1.14.0.dev" +__version__ = "1.15.0.dev" diff --git a/exporter/opentelemetry-exporter-opencensus/src/opentelemetry/exporter/opencensus/version.py b/exporter/opentelemetry-exporter-opencensus/src/opentelemetry/exporter/opencensus/version.py index 7bcf6c0a7ba..fa69afa640a 100644 --- a/exporter/opentelemetry-exporter-opencensus/src/opentelemetry/exporter/opencensus/version.py +++ b/exporter/opentelemetry-exporter-opencensus/src/opentelemetry/exporter/opencensus/version.py @@ -12,4 +12,4 @@ # See the License for the specific language governing permissions and # limitations under the License. -__version__ = "0.35b0.dev" +__version__ = "0.36b0.dev" diff --git a/exporter/opentelemetry-exporter-otlp-proto-grpc/pyproject.toml b/exporter/opentelemetry-exporter-otlp-proto-grpc/pyproject.toml index 3f603d3ebde..e5bf286e288 100644 --- a/exporter/opentelemetry-exporter-otlp-proto-grpc/pyproject.toml +++ b/exporter/opentelemetry-exporter-otlp-proto-grpc/pyproject.toml @@ -29,7 +29,7 @@ dependencies = [ "googleapis-common-protos ~= 1.52", "grpcio >= 1.0.0, < 2.0.0", "opentelemetry-api ~= 1.12", - "opentelemetry-proto == 1.14.0.dev", + "opentelemetry-proto == 1.15.0.dev", "opentelemetry-sdk ~= 1.12", ] diff --git a/exporter/opentelemetry-exporter-otlp-proto-grpc/src/opentelemetry/exporter/otlp/proto/grpc/version.py b/exporter/opentelemetry-exporter-otlp-proto-grpc/src/opentelemetry/exporter/otlp/proto/grpc/version.py index f3bc9d478d6..0fffbf98707 100644 --- a/exporter/opentelemetry-exporter-otlp-proto-grpc/src/opentelemetry/exporter/otlp/proto/grpc/version.py +++ b/exporter/opentelemetry-exporter-otlp-proto-grpc/src/opentelemetry/exporter/otlp/proto/grpc/version.py @@ -12,4 +12,4 @@ # See the License for the specific language governing permissions and # limitations under the License. -__version__ = "1.14.0.dev" +__version__ = "1.15.0.dev" diff --git a/exporter/opentelemetry-exporter-otlp-proto-http/pyproject.toml b/exporter/opentelemetry-exporter-otlp-proto-http/pyproject.toml index 621a076a2a5..1e8784e1a4c 100644 --- a/exporter/opentelemetry-exporter-otlp-proto-http/pyproject.toml +++ b/exporter/opentelemetry-exporter-otlp-proto-http/pyproject.toml @@ -28,7 +28,7 @@ dependencies = [ "backoff >= 1.10.0, < 3.0.0; python_version>='3.7'", "googleapis-common-protos ~= 1.52", "opentelemetry-api ~= 1.12", - "opentelemetry-proto == 1.14.0.dev", + "opentelemetry-proto == 1.15.0.dev", "opentelemetry-sdk ~= 1.12", "requests ~= 2.7", ] diff --git a/exporter/opentelemetry-exporter-otlp-proto-http/src/opentelemetry/exporter/otlp/proto/http/version.py b/exporter/opentelemetry-exporter-otlp-proto-http/src/opentelemetry/exporter/otlp/proto/http/version.py index f3bc9d478d6..0fffbf98707 100644 --- a/exporter/opentelemetry-exporter-otlp-proto-http/src/opentelemetry/exporter/otlp/proto/http/version.py +++ b/exporter/opentelemetry-exporter-otlp-proto-http/src/opentelemetry/exporter/otlp/proto/http/version.py @@ -12,4 +12,4 @@ # See the License for the specific language governing permissions and # limitations under the License. -__version__ = "1.14.0.dev" +__version__ = "1.15.0.dev" diff --git a/exporter/opentelemetry-exporter-otlp/pyproject.toml b/exporter/opentelemetry-exporter-otlp/pyproject.toml index ead4a6b25cc..e67187ff27e 100644 --- a/exporter/opentelemetry-exporter-otlp/pyproject.toml +++ b/exporter/opentelemetry-exporter-otlp/pyproject.toml @@ -25,8 +25,8 @@ classifiers = [ "Typing :: Typed", ] dependencies = [ - "opentelemetry-exporter-otlp-proto-grpc == 1.14.0.dev", - "opentelemetry-exporter-otlp-proto-http == 1.14.0.dev", + "opentelemetry-exporter-otlp-proto-grpc == 1.15.0.dev", + "opentelemetry-exporter-otlp-proto-http == 1.15.0.dev", ] [project.entry-points.opentelemetry_logs_exporter] diff --git a/exporter/opentelemetry-exporter-otlp/src/opentelemetry/exporter/otlp/version.py b/exporter/opentelemetry-exporter-otlp/src/opentelemetry/exporter/otlp/version.py index f3bc9d478d6..0fffbf98707 100644 --- a/exporter/opentelemetry-exporter-otlp/src/opentelemetry/exporter/otlp/version.py +++ b/exporter/opentelemetry-exporter-otlp/src/opentelemetry/exporter/otlp/version.py @@ -12,4 +12,4 @@ # See the License for the specific language governing permissions and # limitations under the License. -__version__ = "1.14.0.dev" +__version__ = "1.15.0.dev" diff --git a/exporter/opentelemetry-exporter-prometheus/src/opentelemetry/exporter/prometheus/version.py b/exporter/opentelemetry-exporter-prometheus/src/opentelemetry/exporter/prometheus/version.py index 7bcf6c0a7ba..fa69afa640a 100644 --- a/exporter/opentelemetry-exporter-prometheus/src/opentelemetry/exporter/prometheus/version.py +++ b/exporter/opentelemetry-exporter-prometheus/src/opentelemetry/exporter/prometheus/version.py @@ -12,4 +12,4 @@ # See the License for the specific language governing permissions and # limitations under the License. -__version__ = "0.35b0.dev" +__version__ = "0.36b0.dev" diff --git a/exporter/opentelemetry-exporter-zipkin-json/src/opentelemetry/exporter/zipkin/json/version.py b/exporter/opentelemetry-exporter-zipkin-json/src/opentelemetry/exporter/zipkin/json/version.py index f3bc9d478d6..0fffbf98707 100644 --- a/exporter/opentelemetry-exporter-zipkin-json/src/opentelemetry/exporter/zipkin/json/version.py +++ b/exporter/opentelemetry-exporter-zipkin-json/src/opentelemetry/exporter/zipkin/json/version.py @@ -12,4 +12,4 @@ # See the License for the specific language governing permissions and # limitations under the License. -__version__ = "1.14.0.dev" +__version__ = "1.15.0.dev" diff --git a/exporter/opentelemetry-exporter-zipkin-proto-http/pyproject.toml b/exporter/opentelemetry-exporter-zipkin-proto-http/pyproject.toml index 8d65405f903..acc0c349d44 100644 --- a/exporter/opentelemetry-exporter-zipkin-proto-http/pyproject.toml +++ b/exporter/opentelemetry-exporter-zipkin-proto-http/pyproject.toml @@ -26,7 +26,7 @@ classifiers = [ ] dependencies = [ "opentelemetry-api ~= 1.3", - "opentelemetry-exporter-zipkin-json == 1.14.0.dev", + "opentelemetry-exporter-zipkin-json == 1.15.0.dev", "opentelemetry-sdk ~= 1.11", "protobuf ~= 3.12", "requests ~= 2.7", diff --git a/exporter/opentelemetry-exporter-zipkin-proto-http/src/opentelemetry/exporter/zipkin/proto/http/version.py b/exporter/opentelemetry-exporter-zipkin-proto-http/src/opentelemetry/exporter/zipkin/proto/http/version.py index f3bc9d478d6..0fffbf98707 100644 --- a/exporter/opentelemetry-exporter-zipkin-proto-http/src/opentelemetry/exporter/zipkin/proto/http/version.py +++ b/exporter/opentelemetry-exporter-zipkin-proto-http/src/opentelemetry/exporter/zipkin/proto/http/version.py @@ -12,4 +12,4 @@ # See the License for the specific language governing permissions and # limitations under the License. -__version__ = "1.14.0.dev" +__version__ = "1.15.0.dev" diff --git a/exporter/opentelemetry-exporter-zipkin/pyproject.toml b/exporter/opentelemetry-exporter-zipkin/pyproject.toml index 575c9166241..f819b45af6b 100644 --- a/exporter/opentelemetry-exporter-zipkin/pyproject.toml +++ b/exporter/opentelemetry-exporter-zipkin/pyproject.toml @@ -25,8 +25,8 @@ classifiers = [ "Typing :: Typed", ] dependencies = [ - "opentelemetry-exporter-zipkin-json == 1.14.0.dev", - "opentelemetry-exporter-zipkin-proto-http == 1.14.0.dev", + "opentelemetry-exporter-zipkin-json == 1.15.0.dev", + "opentelemetry-exporter-zipkin-proto-http == 1.15.0.dev", ] [project.optional-dependencies] diff --git a/exporter/opentelemetry-exporter-zipkin/src/opentelemetry/exporter/zipkin/version.py b/exporter/opentelemetry-exporter-zipkin/src/opentelemetry/exporter/zipkin/version.py index f3bc9d478d6..0fffbf98707 100644 --- a/exporter/opentelemetry-exporter-zipkin/src/opentelemetry/exporter/zipkin/version.py +++ b/exporter/opentelemetry-exporter-zipkin/src/opentelemetry/exporter/zipkin/version.py @@ -12,4 +12,4 @@ # See the License for the specific language governing permissions and # limitations under the License. -__version__ = "1.14.0.dev" +__version__ = "1.15.0.dev" diff --git a/opentelemetry-api/src/opentelemetry/version.py b/opentelemetry-api/src/opentelemetry/version.py index f3bc9d478d6..0fffbf98707 100644 --- a/opentelemetry-api/src/opentelemetry/version.py +++ b/opentelemetry-api/src/opentelemetry/version.py @@ -12,4 +12,4 @@ # See the License for the specific language governing permissions and # limitations under the License. -__version__ = "1.14.0.dev" +__version__ = "1.15.0.dev" diff --git a/opentelemetry-proto/src/opentelemetry/proto/version.py b/opentelemetry-proto/src/opentelemetry/proto/version.py index f3bc9d478d6..0fffbf98707 100644 --- a/opentelemetry-proto/src/opentelemetry/proto/version.py +++ b/opentelemetry-proto/src/opentelemetry/proto/version.py @@ -12,4 +12,4 @@ # See the License for the specific language governing permissions and # limitations under the License. -__version__ = "1.14.0.dev" +__version__ = "1.15.0.dev" diff --git a/opentelemetry-sdk/pyproject.toml b/opentelemetry-sdk/pyproject.toml index 93beabde008..fb3505be9c9 100644 --- a/opentelemetry-sdk/pyproject.toml +++ b/opentelemetry-sdk/pyproject.toml @@ -25,8 +25,8 @@ classifiers = [ "Typing :: Typed", ] dependencies = [ - "opentelemetry-api == 1.14.0.dev", - "opentelemetry-semantic-conventions == 0.35b0.dev", + "opentelemetry-api == 1.15.0.dev", + "opentelemetry-semantic-conventions == 0.36b0.dev", "setuptools >= 16.0", "typing-extensions >= 3.7.4", ] diff --git a/opentelemetry-sdk/src/opentelemetry/sdk/version.py b/opentelemetry-sdk/src/opentelemetry/sdk/version.py index f3bc9d478d6..0fffbf98707 100644 --- a/opentelemetry-sdk/src/opentelemetry/sdk/version.py +++ b/opentelemetry-sdk/src/opentelemetry/sdk/version.py @@ -12,4 +12,4 @@ # See the License for the specific language governing permissions and # limitations under the License. -__version__ = "1.14.0.dev" +__version__ = "1.15.0.dev" diff --git a/opentelemetry-semantic-conventions/src/opentelemetry/semconv/version.py b/opentelemetry-semantic-conventions/src/opentelemetry/semconv/version.py index 7bcf6c0a7ba..fa69afa640a 100644 --- a/opentelemetry-semantic-conventions/src/opentelemetry/semconv/version.py +++ b/opentelemetry-semantic-conventions/src/opentelemetry/semconv/version.py @@ -12,4 +12,4 @@ # See the License for the specific language governing permissions and # limitations under the License. -__version__ = "0.35b0.dev" +__version__ = "0.36b0.dev" diff --git a/propagator/opentelemetry-propagator-b3/src/opentelemetry/propagators/b3/version.py b/propagator/opentelemetry-propagator-b3/src/opentelemetry/propagators/b3/version.py index f3bc9d478d6..0fffbf98707 100644 --- a/propagator/opentelemetry-propagator-b3/src/opentelemetry/propagators/b3/version.py +++ b/propagator/opentelemetry-propagator-b3/src/opentelemetry/propagators/b3/version.py @@ -12,4 +12,4 @@ # See the License for the specific language governing permissions and # limitations under the License. -__version__ = "1.14.0.dev" +__version__ = "1.15.0.dev" diff --git a/propagator/opentelemetry-propagator-jaeger/src/opentelemetry/propagators/jaeger/version.py b/propagator/opentelemetry-propagator-jaeger/src/opentelemetry/propagators/jaeger/version.py index f3bc9d478d6..0fffbf98707 100644 --- a/propagator/opentelemetry-propagator-jaeger/src/opentelemetry/propagators/jaeger/version.py +++ b/propagator/opentelemetry-propagator-jaeger/src/opentelemetry/propagators/jaeger/version.py @@ -12,4 +12,4 @@ # See the License for the specific language governing permissions and # limitations under the License. -__version__ = "1.14.0.dev" +__version__ = "1.15.0.dev" diff --git a/shim/opentelemetry-opentracing-shim/pyproject.toml b/shim/opentelemetry-opentracing-shim/pyproject.toml index 42537bbd466..68b3faba194 100644 --- a/shim/opentelemetry-opentracing-shim/pyproject.toml +++ b/shim/opentelemetry-opentracing-shim/pyproject.toml @@ -32,7 +32,7 @@ dependencies = [ [project.optional-dependencies] test = [ - "opentelemetry-test-utils == 0.35b0.dev", + "opentelemetry-test-utils == 0.36b0.dev", "opentracing ~= 2.2.0", ] diff --git a/shim/opentelemetry-opentracing-shim/src/opentelemetry/shim/opentracing_shim/version.py b/shim/opentelemetry-opentracing-shim/src/opentelemetry/shim/opentracing_shim/version.py index 7bcf6c0a7ba..fa69afa640a 100644 --- a/shim/opentelemetry-opentracing-shim/src/opentelemetry/shim/opentracing_shim/version.py +++ b/shim/opentelemetry-opentracing-shim/src/opentelemetry/shim/opentracing_shim/version.py @@ -12,4 +12,4 @@ # See the License for the specific language governing permissions and # limitations under the License. -__version__ = "0.35b0.dev" +__version__ = "0.36b0.dev" diff --git a/tests/opentelemetry-test-utils/pyproject.toml b/tests/opentelemetry-test-utils/pyproject.toml index eaf2d692077..f280dff89f1 100644 --- a/tests/opentelemetry-test-utils/pyproject.toml +++ b/tests/opentelemetry-test-utils/pyproject.toml @@ -25,8 +25,8 @@ classifiers = [ ] dependencies = [ "asgiref ~= 3.0", - "opentelemetry-api == 1.14.0.dev", - "opentelemetry-sdk == 1.14.0.dev", + "opentelemetry-api == 1.15.0.dev", + "opentelemetry-sdk == 1.15.0.dev", ] [project.optional-dependencies] diff --git a/tests/opentelemetry-test-utils/src/opentelemetry/test/version.py b/tests/opentelemetry-test-utils/src/opentelemetry/test/version.py index 737eebffad6..5ea2af4dddc 100644 --- a/tests/opentelemetry-test-utils/src/opentelemetry/test/version.py +++ b/tests/opentelemetry-test-utils/src/opentelemetry/test/version.py @@ -1 +1 @@ -__version__ = "0.35b0.dev" +__version__ = "0.36b0.dev" From 482b999be85dfaf5fc5d8fc90961a53dbe38d3fc Mon Sep 17 00:00:00 2001 From: Trask Stalnaker Date: Sun, 23 Oct 2022 18:47:20 -0700 Subject: [PATCH 50/51] Fix (#105) * Fix * changelog --- CHANGELOG.md | 3 +++ README.md | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 39fed48dff6..f87c161f5ef 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## Unreleased +- Fix + ([#105](https://github.com/open-telemetry/opentelemetry-python/pull/105)) + ## Version 1.14.0/0.35b0 (2022-10-24) - Update explicit histogram bucket boundaries diff --git a/README.md b/README.md index 03fcdf73b0b..008b4ae5d69 100644 --- a/README.md +++ b/README.md @@ -176,5 +176,5 @@ For project boards and milestones, see the following links: - [Project boards](https://github.com/open-telemetry/opentelemetry-python/projects) - [Milestones](https://github.com/open-telemetry/opentelemetry-python/milestones) -We try to keep these links accurate, so they're the best place to go for questions about project status. The dates and features described in the issues +We try to keep these linksos accurate, so they're the best place to go for questions about project status. The dates and features described in the issues and milestones are estimates and subject to change. From a9db67bf35d3fad9ff90b06fa1889392fc695a6f Mon Sep 17 00:00:00 2001 From: opentelemetrybot <107717825+opentelemetrybot@users.noreply.github.com> Date: Mon, 24 Oct 2022 01:59:51 +0000 Subject: [PATCH 51/51] Copy change log updates from release/v1.14.x-0.35bx --- CHANGELOG.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index f87c161f5ef..637ccbac5f7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## Unreleased +- Fix + ([#105](https://github.com/open-telemetry/opentelemetry-python/pull/105)) + +## Version 1.14.1/0.35b1 (2022-10-24) + - Fix ([#105](https://github.com/open-telemetry/opentelemetry-python/pull/105))