From 3eb7e296e8238180de331f88e97258bf92f02a6d Mon Sep 17 00:00:00 2001 From: Liudmila Molkova Date: Fri, 13 Sep 2024 15:25:37 -0700 Subject: [PATCH 01/25] Per package release --- .../package-prepare-patch-release.yml | 110 ++++++++++ .github/workflows/package-prepare-release.yml | 188 ++++++++++++++++++ .github/workflows/package-release.yml | 156 +++++++++++++++ .../workflows/publish-a-package-from-tag.yml | 31 --- .../resource/detector/azure/version.py | 2 +- scripts/build_a_package.sh | 23 ++- scripts/eachdist.py | 49 ++++- scripts/generate_release_notes.sh | 24 +++ scripts/merge_changelog_to_main.sh | 48 +++++ .../sdk/extension/aws/version.py | 2 +- 10 files changed, 591 insertions(+), 42 deletions(-) create mode 100644 .github/workflows/package-prepare-patch-release.yml create mode 100644 .github/workflows/package-prepare-release.yml create mode 100644 .github/workflows/package-release.yml delete mode 100644 .github/workflows/publish-a-package-from-tag.yml create mode 100755 scripts/generate_release_notes.sh create mode 100755 scripts/merge_changelog_to_main.sh diff --git a/.github/workflows/package-prepare-patch-release.yml b/.github/workflows/package-prepare-patch-release.yml new file mode 100644 index 0000000000..1febc9e53d --- /dev/null +++ b/.github/workflows/package-prepare-patch-release.yml @@ -0,0 +1,110 @@ +name: "[Package] Prepare patch release" +on: + workflow_dispatch: + inputs: + package: + type: choice + options: + - opentelemetry-resource-detector-azure + - opentelemetry-sdk-extension-aws + description: 'Package to be released' + required: true +jobs: + prepare-patch-release: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - name: Verify prerequisites + run: | + if [[ $GITHUB_REF_NAME != package-release/${{ inputs.package }}/v* ]]; then + echo this workflow should only be run against package-release/${{ inputs.package }}* branches, but is running on $GITHUB_REF_NAME + exit 1 + fi + + path=./$(./scripts/eachdist.py find-package --package ${{ inputs.package }}) + changelog=$path/CHANGELOG.md + + if ! grep --quiet "^## Unreleased$" CHANGELOG.md; then + echo the change log is missing an \"Unreleased\" section + exit 1 + fi + + version=$(./scripts/eachdist.py version --package ${{ inputs.package }}) + + version_file=$(find $path -type f -name "version.py") + file_count=$(echo "$version_file" | wc -l) + + if [ "$file_count" -ne 1 ]; then + echo "Error: expected one version.py file, found $file_count" + echo "$version_file" + exit 1 + fi + + if [[ $version =~ ^([0-9]+)\.([0-9]+)\.([0-9]+) ]]; then + # 1.2.3 or 1.2.3rc1 + major="${BASH_REMATCH[1]}" + minor="${BASH_REMATCH[2]}" + patch="${BASH_REMATCH[3]}" + next_version="$major.$minor.$((patch + 1))" + release_branch_name="package-release/${{ inputs.package }}/v$major.$minor.x" + elif [[ $version =~ ^([0-9]+)\.([0-9]+)b([0-9]+)$ ]]; then + # 0.1b1 + major="${BASH_REMATCH[1]}" + minor="${BASH_REMATCH[2]}" + patch="${BASH_REMATCH[3]}" + next_version="$major.${minor}b$((patch + 1))" + release_branch_name="package-release/${{ inputs.package }}/v$major.${minor}bx" + else + echo "unexpected version: '$version'" + exit 1 + fi + + if [[ $GITHUB_REF_NAME != $release_branch_name ]]; then + echo this workflow should only be run against $release_branch_name branch, but is running on $GITHUB_REF_NAME + exit 1 + fi + + echo "PACKAGE_NAME=${{ inputs.package }}" >> $GITHUB_ENV + echo "VERSION=$version" >> $GITHUB_ENV + echo "NEXT_VERSION=$next_version" >> $GITHUB_ENV + echo "CHANGELOG=$changelog" >> $GITHUB_ENV + echo "VERSION_FILE=$version_file" >> $GITHUB_ENV + + - name: Update version + run: | + # replace the version in the version.py file (1.2.3dev -> 1.3.3.dev) + sed -i -E "s/__version__\s*=\s*\"${VERSION}\"/__version__ = \"${NEXT_VERSION}\"/g" $VERSION_FILE + + - name: Set up Python 3.9 + uses: actions/setup-python@v5 + with: + python-version: 3.9 + - name: Install tox + run: pip install tox + - name: run tox + run: tox -e generate + + - name: Update the change log with the approximate release date + 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} + + - name: Use CLA approved github bot + run: .github/scripts/use-cla-approved-github-bot.sh + + - name: Create pull request + env: + # not using secrets.GITHUB_TOKEN since pull requests from that token do not run workflows + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + message="Prepare patch release for ${PACKAGE_NAME} v${NEXT_VERSION}" + branch="opentelemetrybot/prepare-patch-${GITHUB_REF_NAME}" + + 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/package-prepare-release.yml b/.github/workflows/package-prepare-release.yml new file mode 100644 index 0000000000..fd18ccbdb9 --- /dev/null +++ b/.github/workflows/package-prepare-release.yml @@ -0,0 +1,188 @@ +name: "[Package] Prepare release" +on: + workflow_dispatch: + inputs: + package: + type: choice + options: + - opentelemetry-resource-detector-azure + - opentelemetry-sdk-extension-aws + description: 'Package to be released' + required: true + +jobs: + prereqs: + runs-on: ubuntu-latest + outputs: + version: ${{ steps.verify.outputs.version }} + changelog: ${{ steps.verify.outputs.changelog }} + version_file: ${{ steps.verify.outputs.version_file }} + release_branch_name: ${{ steps.verify.outputs.release_branch_name }} + next_version: ${{ steps.verify.outputs.next_version }} + steps: + - uses: actions/checkout@v4 + + - id: verify + name: Verify prerequisites + run: | + if [[ $GITHUB_REF_NAME != main ]]; then + echo this workflow should only be run against main + exit 1 + fi + + path=./$(./scripts/eachdist.py find-package --package ${{ inputs.package }}) + changelog=$path/CHANGELOG.md + + if ! grep --quiet "^## Unreleased$" $changelog; then + echo the change log is missing an \"Unreleased\" section + exit 1 + fi + + version_dev=$(./scripts/eachdist.py version --package ${{ inputs.package }}) + + if [[ ! $version_dev =~ ^([0-9]+)\.([0-9]+)[\.|b]{1}([0-9]+).*.dev$ ]]; then + echo "unexpected version: $version" + exit 1 + fi + + version=${version_dev%.dev} + + version_file=$(find $path -type f -name "version.py") + file_count=$(echo "$version_file" | wc -l) + + if [ "$file_count" -ne 1 ]; then + echo "Error: expected one version.py file, found $file_count" + echo "$version_file" + exit 1 + fi + + if [[ $version =~ ^([0-9]+)\.([0-9]+)\.([0-9]+) ]]; then + # 1.2.3 or 1.2.3rc1 + major="${BASH_REMATCH[1]}" + minor="${BASH_REMATCH[2]}" + release_branch_name="package-release/${{ inputs.package }}/v$major.$minor.x" + next_version="$major.$((minor + 1)).0" + elif [[ $version =~ ^([0-9]+)\.([0-9]+)b([0-9]+)$ ]]; then + # 0.1b1 + major="${BASH_REMATCH[1]}" + minor="${BASH_REMATCH[2]}" + release_branch_name="package-release/${{ inputs.package }}/v$major.${minor}bx" + next_version="$major.$((minor + 1))b0" + else + echo "unexpected version: '$version'" + exit 1 + fi + + echo "version=$version" >> $GITHUB_OUTPUT + echo "changelog=$changelog" >> $GITHUB_OUTPUT + echo "version_file=$version_file" >> $GITHUB_OUTPUT + echo "release_branch_name=$release_branch_name" >> $GITHUB_OUTPUT + echo "next_version=$next_version" >> $GITHUB_OUTPUT + + create-pull-request-against-release-branch: + runs-on: ubuntu-latest + needs: prereqs + steps: + - uses: actions/checkout@v4 + + - name: Set environment variables + run: | + echo "RELEASE_BRANCH_NAME=${{ needs.prereqs.outputs.release_branch_name }}" >> $GITHUB_ENV + echo "VERSION=${{ needs.prereqs.outputs.version }}" >> $GITHUB_ENV + echo "CHANGELOG=${{ needs.prereqs.outputs.changelog }}" >> $GITHUB_ENV + echo "VERSION_FILE=${{ needs.prereqs.outputs.version_file }}" >> $GITHUB_ENV + echo "PACKAGE_NAME=${{ github.event.inputs.package }}" >> $GITHUB_ENV + + - name: Create package release branch + run: | + git push origin HEAD:$RELEASE_BRANCH_NAME + + - name: Update package version + run: | + # replace the version in the version.py file (1.2.3dev -> 1.2.3) + sed -i -E "s/__version__\s*=\s*\"${VERSION}\.dev\"/__version__ = \"${VERSION}\"/g" $VERSION_FILE + + - name: Set up Python 3.9 + uses: actions/setup-python@v5 + with: + python-version: 3.9 + - name: Install tox + run: pip install tox + - name: run tox + run: tox -e generate + + - name: Update the change log with the approximate release date + run: | + date=$(date "+%Y-%m-%d") + sed -Ei "s/^## Unreleased$/## Version ${VERSION} ($date)/" ${CHANGELOG} + + - name: Use CLA approved github bot + run: .github/scripts/use-cla-approved-github-bot.sh + + - name: Create pull request against the release branch + env: + # not using secrets.GITHUB_TOKEN since pull requests from that token do not run workflows + GITHUB_TOKEN: ${{ secrets.OPENTELEMETRYBOT_GITHUB_TOKEN }} + run: | + message="Prepare release for ${PACKAGE_NAME} v${VERSION}" + branch="opentelemetrybot/prepare-${RELEASE_BRANCH_NAME}" + + 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 + needs: prereqs + steps: + - uses: actions/checkout@v4 + + - name: Set environment variables + run: | + echo "PACKAGE_NAME=${{ github.event.inputs.package }}" >> $GITHUB_ENV + echo "VERSION=${{ needs.prereqs.outputs.version }}" >> $GITHUB_ENV + echo "VERSION_FILE=${{ needs.prereqs.outputs.version_file }}" >> $GITHUB_ENV + echo "NEXT_VERSION=${{ needs.prereqs.outputs.next_version }}" >> $GITHUB_ENV + echo "CHANGELOG=${{ needs.prereqs.outputs.changelog }}" >> $GITHUB_ENV + + - name: Update version + run: | + # replace the version in the version.py file (1.2.3dev -> 1.3.3.dev) + sed -i -E "s/__version__\s*=\s*\"${VERSION}\.dev\"/__version__ = \"${NEXT_VERSION}.dev\"/g" $VERSION_FILE + + - name: Set up Python 3.9 + uses: actions/setup-python@v5 + with: + python-version: 3.9 + - name: Install tox + run: pip install tox + - name: run tox + run: tox -e generate + + - 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} + + - name: Use CLA approved github bot + run: .github/scripts/use-cla-approved-github-bot.sh + + - name: Create pull request against main + env: + # not using secrets.GITHUB_TOKEN since pull requests from that token do not run workflows + GITHUB_TOKEN: ${{ secrets.OPENTELEMETRYBOT_GITHUB_TOKEN }} + run: | + message="Update ${PACKAGE_NAME} version to v${NEXT_VERSION}" + body="Update \`${PACKAGE_NAME}\` version to v\`${NEXT_VERSION}\`." + branch="opentelemetrybot/update-${PACKAGE_NAME}-version-to-v${NEXT_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/package-release.yml b/.github/workflows/package-release.yml new file mode 100644 index 0000000000..c84a01e27a --- /dev/null +++ b/.github/workflows/package-release.yml @@ -0,0 +1,156 @@ +name: "[Package] Release" +on: + workflow_dispatch: + inputs: + package: + type: choice + options: + - opentelemetry-resource-detector-azure + - opentelemetry-sdk-extension-aws + description: 'Package to be released' + required: true +jobs: + release: + runs-on: ubuntu-latest + steps: + - run: | + if [[ $GITHUB_REF_NAME != package-release/${{ inputs.package }}* ]]; then + echo this workflow should only be run against package-release/${{ inputs.package }}* branches + exit 1 + fi + + - uses: actions/checkout@v4 + + - name: Set environment variables + run: | + version=$(./scripts/eachdist.py version --package ${{ inputs.package }}) + if [[ $version =~ ^([0-9]+)\.([0-9]+)\.([0-9]+) ]]; then + major="${BASH_REMATCH[1]}" + minor="${BASH_REMATCH[2]}" + patch="${BASH_REMATCH[3]}" + if [[ $patch != 0 ]]; then + prior_version_when_patch="${major}.${minor}.$((patch - 1))" + fi + elif [[ $version =~ ^([0-9]+)\.([0-9]+)b([0-9]+)$ ]]; then + major="${BASH_REMATCH[1]}" + minor="${BASH_REMATCH[2]}" + patch="${BASH_REMATCH[3]}" + + if [[ $patch != 0 ]]; then + prior_version_when_patch="${major}.${minor}b$((patch - 1))" + fi + else + echo "unexpected version: $version" + exit 1 + fi + + path=$(./scripts/eachdist.py find-package --package ${{ inputs.package }}) + echo "CHANGELOG=./$path/CHANGELOG.md" >> $GITHUB_ENV + echo "PACKAGE_NAME=${{ inputs.package }}" >> $GITHUB_ENV + echo "VERSION=$version" >> $GITHUB_ENV + echo "RELEASE_TAG=${{ inputs.package }}==$version" >> $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@v4 + with: + ref: main + + - name: Check that change log update was merged to main + run: | + if [[ -z $PRIOR_VERSION_WHEN_PATCH ]]; then + # not making a patch release + if ! grep --quiet "^## Version ${VERSION}" ${CHANGELOG}; 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@v4 + + # next few steps publish to pypi + - uses: actions/setup-python@v5 + with: + python-version: '3.8' + + - name: Build wheels + run: ./scripts/build_a_package.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. + # EDIT: 5/31/2024 - TestPypi now requires a verified email. Commenting out as a temporary measure + # until we found TestPypi credentials. + # - 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/* + continue-on-error: true + + - name: Generate release notes + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: ./scripts/generate_release_notes.sh + + - name: Create GitHub release + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + gh release create --target $GITHUB_REF_NAME \ + --title "${PACKAGE_NAME} ${VERSION}" \ + --notes-file /tmp/release-notes.txt \ + --discussion-category announcements \ + $RELEASE_TAG + + - uses: actions/checkout@v4 + with: + ref: main + + - name: Copy change log updates to main + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: ./scripts/merge_changelog_to_main.sh + + - name: Use CLA approved github bot + run: .github/scripts/use-cla-approved-github-bot.sh + + - name: Create pull request against main + env: + # not using secrets.GITHUB_TOKEN since pull requests from that token do not run workflows + GITHUB_TOKEN: ${{ secrets.OPENTELEMETRYBOT_GITHUB_TOKEN }} + run: | + message="Copy changelog updates from $GITHUB_REF_NAME" + body="Copy changelog updates from \`$GITHUB_REF_NAME\`." + branch="opentelemetrybot/copy-change-log-updates-from-${GITHUB_REF_NAME//\//-}" + + 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 + gh pr create --title "$message" \ + --body "$body" \ + --head $branch \ + --base main diff --git a/.github/workflows/publish-a-package-from-tag.yml b/.github/workflows/publish-a-package-from-tag.yml deleted file mode 100644 index a64f5fcf15..0000000000 --- a/.github/workflows/publish-a-package-from-tag.yml +++ /dev/null @@ -1,31 +0,0 @@ -name: Publish a Package from Tag - -on: - push: - tags: - - 'opentelemetry-*==[1-9]*.*' - -jobs: - publish-a-package: - name: Publish package from tag - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - uses: actions/setup-python@v5 - with: - python-version: '3.9' - - name: Log tag that triggered publish workflow - run: echo "Attempting to publish package from tag $GITHUB_REF" - - name: Build wheel for tag - run: ./scripts/build_a_package.sh - - name: Install twine - run: | - pip install twine - # We don't need to publish to TestPyPI because we only publish 1 package. - # If it fails no other work needs to be reversed. - - name: Publish to PyPI - env: - TWINE_USERNAME: '__token__' - TWINE_PASSWORD: ${{ secrets.pypi_password }} - run: | - twine upload --skip-existing --verbose dist/* diff --git a/resource/opentelemetry-resource-detector-azure/src/opentelemetry/resource/detector/azure/version.py b/resource/opentelemetry-resource-detector-azure/src/opentelemetry/resource/detector/azure/version.py index fac29d773f..b5a5a1eb31 100644 --- a/resource/opentelemetry-resource-detector-azure/src/opentelemetry/resource/detector/azure/version.py +++ b/resource/opentelemetry-resource-detector-azure/src/opentelemetry/resource/detector/azure/version.py @@ -12,4 +12,4 @@ # See the License for the specific language governing permissions and # limitations under the License. -__version__ = "0.1.5" +__version__ = "0.1.5.dev" diff --git a/scripts/build_a_package.sh b/scripts/build_a_package.sh index 333deccd80..a19cc9c610 100755 --- a/scripts/build_a_package.sh +++ b/scripts/build_a_package.sh @@ -20,17 +20,21 @@ set -ev -if [ -z $GITHUB_REF ]; then - echo 'Failed to run script, missing workflow env variable GITHUB_REF.' +if [ $PACKAGE_NAME ]; then + pkg_name=${PACKAGE_NAME} + pkg_version=${VERSION} +elif [ $GITHUB_REF ]; then + pkg_name_and_version=${GITHUB_REF#refs/tags/*} + pkg_name=${pkg_name_and_version%==*} + pkg_version=${pkg_name_and_version#opentelemetry-*==} +else + echo 'Failed to run script, missing workflow env variable GITHUB_REF or PACKAGE_NAME and VERSION.' exit 1 fi -pkg_name_and_version=${GITHUB_REF#refs/tags/*} -pkg_name=${pkg_name_and_version%==*} -pkg_version=${pkg_name_and_version#opentelemetry-*==} # Get the latest versions of packaging tools -python3 -m pip install --upgrade pip setuptools wheel packaging +python3 -m pip install --upgrade pip build setuptools wheel packaging # Validate version against PEP 440 conventions: https://packaging.pypa.io/en/latest/version.html python3 -c "from packaging.version import Version; Version('${pkg_version}')" @@ -57,7 +61,12 @@ python3 -m build --outdir ${distdir} cd $distdir -pkg_tar_gz_file=${pkg_name}-${pkg_version}.tar.gz +pkg_tar_gz_file=`echo $pkg_name | sed 's/-/_/g'`-${pkg_version}.tar.gz + +echo "Checking if $pkg_tar_gz_file exists in dist/ directory." + +# print the list of files in current directory +echo $(ls) if ! [ -f $pkg_tar_gz_file ]; then echo 'Error! Tag version does not match version built using latest package files.' diff --git a/scripts/eachdist.py b/scripts/eachdist.py index 2eaabee2c7..57d98206b7 100755 --- a/scripts/eachdist.py +++ b/scripts/eachdist.py @@ -260,7 +260,23 @@ def setup_instparser(instparser): See description of exec for available options.""" ), ) + versionparser.add_argument( + "--package", + "-p", + required=False, + help="Name of a specific package to get the version for", + ) + findparser = subparsers.add_parser( + "find-package", help="Find package path.", + ) + findparser.set_defaults(func=find_package_args) + findparser.add_argument( + "--package", + "-p", + required=True, + help="Name of the package to find", + ) return parser.parse_args(args) @@ -478,7 +494,7 @@ def install_args(args): ), ) ) - + if args.with_dev_deps: rootpath = find_projectroot() runsubprocess( @@ -726,8 +742,37 @@ def format_args(args): def version_args(args): cfg = ConfigParser() cfg.read(str(find_projectroot() / "eachdist.ini")) - print(cfg[args.mode]["version"]) + if not args.package: + print(cfg[args.mode]["version"]) + return + + root = find_projectroot() + for package in find_targets_unordered(root): + if args.package == package.name: + version_file = find("version.py", package) + if version_file is None: + print(f"file missing: {package}/version.py") + return + with open(version_file, encoding="utf-8") as file: + for line in file: + if "__version__" in line: + print(line.split('"')[1]) + return + + print("package not found") + sys.exit(1) + +def find_package_args(args): + root = find_projectroot() + for package in find_targets_unordered(root): + if args.package == package.name: + relative_path = package.relative_to(root) + print(relative_path) + return + + print("package not found") + sys.exit(1) def main(): args = parse_args() diff --git a/scripts/generate_release_notes.sh b/scripts/generate_release_notes.sh new file mode 100755 index 0000000000..47c9a4658a --- /dev/null +++ b/scripts/generate_release_notes.sh @@ -0,0 +1,24 @@ +#!/bin/bash + +# This script copies release notes for the current version from CHANGELOG.md file +# and stores them in /tmp/release-notes.txt. +# It also stores them in a /tmp/CHANGELOG_SECTION.md which is used later to copy them over to the +# CHANGELOG in main branch which is done by merge_changelog_to_main script. + +set -ev + +# conditional block not indented because of the heredoc +if [[ ! -z $PRIOR_VERSION_WHEN_PATCH ]]; then +cat > /tmp/release-notes.txt << EOF +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 > /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 +perl -0pe 's/(?> /tmp/release-notes.txt diff --git a/scripts/merge_changelog_to_main.sh b/scripts/merge_changelog_to_main.sh new file mode 100755 index 0000000000..b96ad30db4 --- /dev/null +++ b/scripts/merge_changelog_to_main.sh @@ -0,0 +1,48 @@ +#!/bin/bash + +# This script copies release notes for the current version from CHANGELOG.md file +# and stores them in a temporary file for later use in the release workflow + +set -ev + +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 $RELEASE_TAG --json publishedAt --jq .publishedAt | sed 's/T.*//') + sed -Ei "s/## Version ${VERSION}.*/## Version ${VERSION} ($date)/" ${CHANGELOG} + + # 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} > /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} \ + >> /tmp/CHANGELOG.md + + # update the real CHANGELOG.md + cp /tmp/CHANGELOG.md ${CHANGELOG} +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} > /tmp/CHANGELOG.md + + # add the heading + date=$(gh release view $RELEASE_TAG --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} >> /tmp/CHANGELOG.md + + # update the real CHANGELOG.md + cp /tmp/CHANGELOG.md ${CHANGELOG} +fi \ No newline at end of file diff --git a/sdk-extension/opentelemetry-sdk-extension-aws/src/opentelemetry/sdk/extension/aws/version.py b/sdk-extension/opentelemetry-sdk-extension-aws/src/opentelemetry/sdk/extension/aws/version.py index c9cb3877e2..66909116d0 100644 --- a/sdk-extension/opentelemetry-sdk-extension-aws/src/opentelemetry/sdk/extension/aws/version.py +++ b/sdk-extension/opentelemetry-sdk-extension-aws/src/opentelemetry/sdk/extension/aws/version.py @@ -12,4 +12,4 @@ # See the License for the specific language governing permissions and # limitations under the License. -__version__ = "2.0.2" +__version__ = "2.0.2.dev" From 5ac2256161e04f9f17837ff9a630707eef4cc7f6 Mon Sep 17 00:00:00 2001 From: Liudmila Molkova Date: Tue, 17 Sep 2024 13:03:07 -0700 Subject: [PATCH 02/25] update docs and some fixes --- .../package-prepare-patch-release.yml | 2 +- RELEASING.md | 33 +++++++++++++++++++ .../resource/detector/azure/version.py | 2 +- .../CHANGELOG.md | 13 ++++++++ .../sdk/extension/aws/version.py | 2 +- 5 files changed, 49 insertions(+), 3 deletions(-) create mode 100644 sdk-extension/opentelemetry-sdk-extension-aws/CHANGELOG.md diff --git a/.github/workflows/package-prepare-patch-release.yml b/.github/workflows/package-prepare-patch-release.yml index 1febc9e53d..a84b3e39bd 100644 --- a/.github/workflows/package-prepare-patch-release.yml +++ b/.github/workflows/package-prepare-patch-release.yml @@ -97,7 +97,7 @@ jobs: - name: Create pull request env: # not using secrets.GITHUB_TOKEN since pull requests from that token do not run workflows - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + GITHUB_TOKEN: ${{ secrets.OPENTELEMETRYBOT_GITHUB_TOKEN }} run: | message="Prepare patch release for ${PACKAGE_NAME} v${NEXT_VERSION}" branch="opentelemetrybot/prepare-patch-${GITHUB_REF_NAME}" diff --git a/RELEASING.md b/RELEASING.md index 5a359159fb..7686a4ff3f 100644 --- a/RELEASING.md +++ b/RELEASING.md @@ -12,6 +12,17 @@ * Merge the one targeted towards the release branch. * The builds will fail for the `main` pr because of validation rules. Follow the [release workflow](https://github.com/open-telemetry/opentelemetry-python/blob/main/RELEASING.md) for the core repo up until this same point. Change the SHAs of each PR to point at each other to get the `main` builds to pass. +### Preparing a major or minor release for individual package + +> [!NOTE] +> Per-package release is supported only for packages included in the corresponding workflow. Libraries that support per-package release are currently +> excluded from the general release. + +Package release preparation is handled by the [`[Package] Prepare release`](./.github/workflows/package-prepare-release.yml) workflow that allows +to pick a specific package to release. It follows the same versioning strategy and process as the general release. + +Long-term package release branch follows `package-release/{package-name}/v{major}.{minor}.x` (or `package-release/{package-name}/v{major}.{minor}bx`) naming pattern. + ## Preparing a new patch release * Backport pull request(s) to the release branch. @@ -27,6 +38,17 @@ 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. +### Preparing a patch release for individual package + +> [!NOTE] +> Per-package release is supported only for packages included in the corresponding workflow. Libraries that support per-package release are currently +> excluded from the general patch release. + +Per-package patch release preparation is handled by the [`[Package] Prepare patch release`](./.github/workflows/package-prepare-patch-release.yml) workflow that allows +to pick a specific package to release. + +The workflow can only be run against long-term release branch such as `package-release/{package-name}/v{major}.{minor}.x` or `package-release/{package-name}/v{major}.{minor}bx`. + ## Making the release * Run the [Release workflow](https://github.com/open-telemetry/opentelemetry-python-contrib/actions/workflows/release.yml). @@ -37,6 +59,17 @@ (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). +### Releasing individual package + +> [!NOTE] +> Per-package release is supported only for packages included in the corresponding workflow. Libraries that support per-package release are currently +> excluded from the general patch release. + +Per-package patch release preparation is handled by the [`[Package] Release`](./.github/workflows/package-release.yml) workflow that allows +to pick a specific package to release. + +The workflow can only be run against long-term release branch such as `package-release/{package-name}/v{major}.{minor}.x` or `package-release/{package-name}/v{major}.{minor}bx`. + ## Notes about version numbering for stable components * The version number for stable components in the `main` branch is always `X.Y.0.dev`, diff --git a/resource/opentelemetry-resource-detector-azure/src/opentelemetry/resource/detector/azure/version.py b/resource/opentelemetry-resource-detector-azure/src/opentelemetry/resource/detector/azure/version.py index b5a5a1eb31..2d2443baa6 100644 --- a/resource/opentelemetry-resource-detector-azure/src/opentelemetry/resource/detector/azure/version.py +++ b/resource/opentelemetry-resource-detector-azure/src/opentelemetry/resource/detector/azure/version.py @@ -12,4 +12,4 @@ # See the License for the specific language governing permissions and # limitations under the License. -__version__ = "0.1.5.dev" +__version__ = "0.1.6.dev" diff --git a/sdk-extension/opentelemetry-sdk-extension-aws/CHANGELOG.md b/sdk-extension/opentelemetry-sdk-extension-aws/CHANGELOG.md new file mode 100644 index 0000000000..2d01260554 --- /dev/null +++ b/sdk-extension/opentelemetry-sdk-extension-aws/CHANGELOG.md @@ -0,0 +1,13 @@ +# Changelog + +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 + +## Version 2.0.2 (2024-08-05) + +See [common CHANGELOG](../../CHANGELOG.md) for the changes in this and prior versions. + diff --git a/sdk-extension/opentelemetry-sdk-extension-aws/src/opentelemetry/sdk/extension/aws/version.py b/sdk-extension/opentelemetry-sdk-extension-aws/src/opentelemetry/sdk/extension/aws/version.py index 66909116d0..0723dc818d 100644 --- a/sdk-extension/opentelemetry-sdk-extension-aws/src/opentelemetry/sdk/extension/aws/version.py +++ b/sdk-extension/opentelemetry-sdk-extension-aws/src/opentelemetry/sdk/extension/aws/version.py @@ -12,4 +12,4 @@ # See the License for the specific language governing permissions and # limitations under the License. -__version__ = "2.0.2.dev" +__version__ = "2.0.3.dev" From 87921e6b5fb5dc076619d3735c67cf0d2b29b56a Mon Sep 17 00:00:00 2001 From: Liudmila Molkova Date: Tue, 17 Sep 2024 13:04:32 -0700 Subject: [PATCH 03/25] up --- .github/workflows/package-release.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/package-release.yml b/.github/workflows/package-release.yml index c84a01e27a..f25f4997ee 100644 --- a/.github/workflows/package-release.yml +++ b/.github/workflows/package-release.yml @@ -103,7 +103,6 @@ jobs: TWINE_PASSWORD: ${{ secrets.pypi_password }} run: | twine upload --skip-existing --verbose dist/* - continue-on-error: true - name: Generate release notes env: From 79cb61a2290b318886041cb842f278861f261662 Mon Sep 17 00:00:00 2001 From: Liudmila Molkova Date: Tue, 17 Sep 2024 13:27:15 -0700 Subject: [PATCH 04/25] up --- CHANGELOG.md | 6 ++++++ .../opentelemetry-propagator-aws-xray/CHANGELOG.md | 13 +++++++++++++ .../src/opentelemetry/propagators/aws/version.py | 2 +- 3 files changed, 20 insertions(+), 1 deletion(-) create mode 100644 propagator/opentelemetry-propagator-aws-xray/CHANGELOG.md diff --git a/CHANGELOG.md b/CHANGELOG.md index e4dcc10c7b..229d912a7e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,12 @@ 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). +> [!NOTE] +> The following components are released independently and maintain individual CHANGELOG files: +> - [opentelemetry-resource-detector-azure](./resource/opentelemetry-resource-detector-azure/CHANGELOG.md) +> - [opentelemetry-sdk-extension-aws](./sdk-extension/opentelemetry-sdk-extension-aws/CHANGELOG.md) +> - [opentelemetry-propagator-aws-xray](./propagator/opentelemetry-propagator-aws-xray/CHANGELOG.md) + ## Unreleased ### Added diff --git a/propagator/opentelemetry-propagator-aws-xray/CHANGELOG.md b/propagator/opentelemetry-propagator-aws-xray/CHANGELOG.md new file mode 100644 index 0000000000..bb0292f819 --- /dev/null +++ b/propagator/opentelemetry-propagator-aws-xray/CHANGELOG.md @@ -0,0 +1,13 @@ +# Changelog + +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 + +## Version 1.0.2 (2024-08-05) + +See [common CHANGELOG](../../CHANGELOG.md) for the changes in this and prior versions. + diff --git a/propagator/opentelemetry-propagator-aws-xray/src/opentelemetry/propagators/aws/version.py b/propagator/opentelemetry-propagator-aws-xray/src/opentelemetry/propagators/aws/version.py index 1a30b96547..1447ffcc1e 100644 --- a/propagator/opentelemetry-propagator-aws-xray/src/opentelemetry/propagators/aws/version.py +++ b/propagator/opentelemetry-propagator-aws-xray/src/opentelemetry/propagators/aws/version.py @@ -12,4 +12,4 @@ # See the License for the specific language governing permissions and # limitations under the License. -__version__ = "1.0.2" +__version__ = "1.0.3.dev" From 517d09d3dda4478ba661d9c93c5d03cf05659281 Mon Sep 17 00:00:00 2001 From: Liudmila Molkova Date: Thu, 19 Sep 2024 16:11:36 -0700 Subject: [PATCH 05/25] feedback --- .../workflows/package-prepare-patch-release.yml | 1 + .github/workflows/package-prepare-release.yml | 1 + .github/workflows/package-release.yml | 1 + CHANGELOG.md | 6 ++---- RELEASING.md | 16 ++++++++++++---- 5 files changed, 17 insertions(+), 8 deletions(-) diff --git a/.github/workflows/package-prepare-patch-release.yml b/.github/workflows/package-prepare-patch-release.yml index a84b3e39bd..0be1dc1b4b 100644 --- a/.github/workflows/package-prepare-patch-release.yml +++ b/.github/workflows/package-prepare-patch-release.yml @@ -5,6 +5,7 @@ on: package: type: choice options: + - opentelemetry-propagator-aws-xray - opentelemetry-resource-detector-azure - opentelemetry-sdk-extension-aws description: 'Package to be released' diff --git a/.github/workflows/package-prepare-release.yml b/.github/workflows/package-prepare-release.yml index fd18ccbdb9..950f240f03 100644 --- a/.github/workflows/package-prepare-release.yml +++ b/.github/workflows/package-prepare-release.yml @@ -5,6 +5,7 @@ on: package: type: choice options: + - opentelemetry-propagator-aws-xray - opentelemetry-resource-detector-azure - opentelemetry-sdk-extension-aws description: 'Package to be released' diff --git a/.github/workflows/package-release.yml b/.github/workflows/package-release.yml index f25f4997ee..a569258d56 100644 --- a/.github/workflows/package-release.yml +++ b/.github/workflows/package-release.yml @@ -5,6 +5,7 @@ on: package: type: choice options: + - opentelemetry-propagator-aws-xray - opentelemetry-resource-detector-azure - opentelemetry-sdk-extension-aws description: 'Package to be released' diff --git a/CHANGELOG.md b/CHANGELOG.md index 229d912a7e..e181b6699b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,10 +6,8 @@ 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). > [!NOTE] -> The following components are released independently and maintain individual CHANGELOG files: -> - [opentelemetry-resource-detector-azure](./resource/opentelemetry-resource-detector-azure/CHANGELOG.md) -> - [opentelemetry-sdk-extension-aws](./sdk-extension/opentelemetry-sdk-extension-aws/CHANGELOG.md) -> - [opentelemetry-propagator-aws-xray](./propagator/opentelemetry-propagator-aws-xray/CHANGELOG.md) +> Some following components are released independently and maintain individual CHANGELOG files. +> Use [this search for a list of all CHANGELOG.md files in this repo](https://github.com/search?q=repo%3Aopen-telemetry%2Fopentelemetry-python-contrib+path%3A**%2FCHANGELOG.md&type=code). ## Unreleased diff --git a/RELEASING.md b/RELEASING.md index 7686a4ff3f..825244d813 100644 --- a/RELEASING.md +++ b/RELEASING.md @@ -15,8 +15,12 @@ ### Preparing a major or minor release for individual package > [!NOTE] -> Per-package release is supported only for packages included in the corresponding workflow. Libraries that support per-package release are currently -> excluded from the general release. +> Per-package release is supported for the following packages only: +> - opentelemetry-propagator-aws-xray +> - opentelemetry-resource-detector-azure +> - opentelemetry-sdk-extension-aws +> +> These libraries are also excluded from the general release. Package release preparation is handled by the [`[Package] Prepare release`](./.github/workflows/package-prepare-release.yml) workflow that allows to pick a specific package to release. It follows the same versioning strategy and process as the general release. @@ -62,8 +66,12 @@ The workflow can only be run against long-term release branch such as `package-r ### Releasing individual package > [!NOTE] -> Per-package release is supported only for packages included in the corresponding workflow. Libraries that support per-package release are currently -> excluded from the general patch release. +> Per-package patch release is supported for the following packages only: +> - opentelemetry-propagator-aws-xray +> - opentelemetry-resource-detector-azure +> - opentelemetry-sdk-extension-aws +> +> These libraries are also excluded from the general patch release. Per-package patch release preparation is handled by the [`[Package] Release`](./.github/workflows/package-release.yml) workflow that allows to pick a specific package to release. From 78ed3b410626297c233e49dc24b3db28d8faefb0 Mon Sep 17 00:00:00 2001 From: Liudmila Molkova Date: Thu, 19 Sep 2024 16:22:37 -0700 Subject: [PATCH 06/25] DELETEME --- .github/workflows/package-prepare-patch-release.yml | 2 +- .github/workflows/package-prepare-release.yml | 4 ++-- .github/workflows/package-release.yml | 6 +++--- .github/workflows/prepare-patch-release.yml | 2 +- resource/opentelemetry-resource-detector-azure/README.rst | 8 ++++---- .../opentelemetry-resource-detector-azure/pyproject.toml | 2 +- .../test-requirements.txt | 2 +- tox.ini | 2 +- 8 files changed, 14 insertions(+), 14 deletions(-) diff --git a/.github/workflows/package-prepare-patch-release.yml b/.github/workflows/package-prepare-patch-release.yml index 0be1dc1b4b..ae18235797 100644 --- a/.github/workflows/package-prepare-patch-release.yml +++ b/.github/workflows/package-prepare-patch-release.yml @@ -98,7 +98,7 @@ jobs: - name: Create pull request env: # not using secrets.GITHUB_TOKEN since pull requests from that token do not run workflows - GITHUB_TOKEN: ${{ secrets.OPENTELEMETRYBOT_GITHUB_TOKEN }} + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | message="Prepare patch release for ${PACKAGE_NAME} v${NEXT_VERSION}" branch="opentelemetrybot/prepare-patch-${GITHUB_REF_NAME}" diff --git a/.github/workflows/package-prepare-release.yml b/.github/workflows/package-prepare-release.yml index 950f240f03..019cd0f217 100644 --- a/.github/workflows/package-prepare-release.yml +++ b/.github/workflows/package-prepare-release.yml @@ -123,7 +123,7 @@ jobs: - name: Create pull request against the release branch env: # not using secrets.GITHUB_TOKEN since pull requests from that token do not run workflows - GITHUB_TOKEN: ${{ secrets.OPENTELEMETRYBOT_GITHUB_TOKEN }} + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | message="Prepare release for ${PACKAGE_NAME} v${VERSION}" branch="opentelemetrybot/prepare-${RELEASE_BRANCH_NAME}" @@ -175,7 +175,7 @@ jobs: - name: Create pull request against main env: # not using secrets.GITHUB_TOKEN since pull requests from that token do not run workflows - GITHUB_TOKEN: ${{ secrets.OPENTELEMETRYBOT_GITHUB_TOKEN }} + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | message="Update ${PACKAGE_NAME} version to v${NEXT_VERSION}" body="Update \`${PACKAGE_NAME}\` version to v\`${NEXT_VERSION}\`." diff --git a/.github/workflows/package-release.yml b/.github/workflows/package-release.yml index a569258d56..3640df959b 100644 --- a/.github/workflows/package-release.yml +++ b/.github/workflows/package-release.yml @@ -101,9 +101,9 @@ jobs: - name: Publish to PyPI env: TWINE_USERNAME: '__token__' - TWINE_PASSWORD: ${{ secrets.pypi_password }} + TWINE_PASSWORD: ${{ secrets.test_pypi_token }} run: | - twine upload --skip-existing --verbose dist/* + twine upload --repository testpypi --skip-existing --verbose dist/* - name: Generate release notes env: @@ -135,7 +135,7 @@ jobs: - name: Create pull request against main env: # not using secrets.GITHUB_TOKEN since pull requests from that token do not run workflows - GITHUB_TOKEN: ${{ secrets.OPENTELEMETRYBOT_GITHUB_TOKEN }} + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | message="Copy changelog updates from $GITHUB_REF_NAME" body="Copy changelog updates from \`$GITHUB_REF_NAME\`." diff --git a/.github/workflows/prepare-patch-release.yml b/.github/workflows/prepare-patch-release.yml index 7c854d436d..79a9acf887 100644 --- a/.github/workflows/prepare-patch-release.yml +++ b/.github/workflows/prepare-patch-release.yml @@ -69,7 +69,7 @@ jobs: - name: Create pull request env: # not using secrets.GITHUB_TOKEN since pull requests from that token do not run workflows - GITHUB_TOKEN: ${{ secrets.OPENTELEMETRYBOT_GITHUB_TOKEN }} + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | message="Prepare release ${STABLE_VERSION}/${UNSTABLE_VERSION}" branch="opentelemetrybot/prepare-release-${STABLE_VERSION}-${UNSTABLE_VERSION}" diff --git a/resource/opentelemetry-resource-detector-azure/README.rst b/resource/opentelemetry-resource-detector-azure/README.rst index 19a0f97f32..03d6749ae6 100644 --- a/resource/opentelemetry-resource-detector-azure/README.rst +++ b/resource/opentelemetry-resource-detector-azure/README.rst @@ -3,8 +3,8 @@ OpenTelemetry Resource detectors for Azure |pypi| -.. |pypi| image:: https://badge.fury.io/py/opentelemetry-resource-detector-azure.svg - :target: https://pypi.org/project/opentelemetry-resource-detector-azure/ +.. |pypi| image:: https://badge.fury.io/py/lmolkova-opentelemetry-resource-detector-azure.svg + :target: https://pypi.org/project/lmolkova-opentelemetry-resource-detector-azure/ This library contains OpenTelemetry `Resource Detectors `_ for the following Azure resources: * `Azure App Service `_ @@ -16,11 +16,11 @@ Installation :: - pip install opentelemetry-resource-detector-azure + pip install lmolkova-opentelemetry-resource-detector-azure --------------------------- -Usage example for ``opentelemetry-resource-detector-azure`` +Usage example for ``lmolkova-opentelemetry-resource-detector-azure`` .. code-block:: python diff --git a/resource/opentelemetry-resource-detector-azure/pyproject.toml b/resource/opentelemetry-resource-detector-azure/pyproject.toml index 14952b751c..b8bbd4dce5 100644 --- a/resource/opentelemetry-resource-detector-azure/pyproject.toml +++ b/resource/opentelemetry-resource-detector-azure/pyproject.toml @@ -3,7 +3,7 @@ requires = ["hatchling"] build-backend = "hatchling.build" [project] -name = "opentelemetry-resource-detector-azure" +name = "lmolkova-opentelemetry-resource-detector-azure" dynamic = ["version"] description = "Azure Resource Detector for OpenTelemetry" readme = "README.rst" diff --git a/resource/opentelemetry-resource-detector-azure/test-requirements.txt b/resource/opentelemetry-resource-detector-azure/test-requirements.txt index fe04c99490..1f7a2de395 100644 --- a/resource/opentelemetry-resource-detector-azure/test-requirements.txt +++ b/resource/opentelemetry-resource-detector-azure/test-requirements.txt @@ -10,4 +10,4 @@ typing_extensions==4.12.2 wrapt==1.16.0 zipp==3.19.2 -e opentelemetry-instrumentation --e resource/opentelemetry-resource-detector-azure +-e resource/lmolkova-opentelemetry-resource-detector-azure diff --git a/tox.ini b/tox.ini index 2b0995d8fc..5d1dd8206c 100644 --- a/tox.ini +++ b/tox.ini @@ -11,7 +11,7 @@ envlist = pypy3-test-resource-detector-container lint-resource-detector-container - ; opentelemetry-resource-detector-azure + ; lmolkova-opentelemetry-resource-detector-azure py3{8,9,10,11,12}-test-resource-detector-azure pypy3-test-resource-detector-azure lint-resource-detector-azure From 196bc6d64858dacf2ecffb3f2c83a9db893b380c Mon Sep 17 00:00:00 2001 From: opentelemetrybot <107717825+opentelemetrybot@users.noreply.github.com> Date: Thu, 19 Sep 2024 23:44:03 +0000 Subject: [PATCH 07/25] Update opentelemetry-resource-detector-azure version to v0.2.0 --- resource/opentelemetry-resource-detector-azure/CHANGELOG.md | 2 ++ .../src/opentelemetry/resource/detector/azure/version.py | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/resource/opentelemetry-resource-detector-azure/CHANGELOG.md b/resource/opentelemetry-resource-detector-azure/CHANGELOG.md index 5e16c83d63..dbe1a908ed 100644 --- a/resource/opentelemetry-resource-detector-azure/CHANGELOG.md +++ b/resource/opentelemetry-resource-detector-azure/CHANGELOG.md @@ -7,6 +7,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## Unreleased +## Version 0.1.6 (2024-09-19) + - Ensure consistently use of suppress_instrumentation utils ([#2590](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2590)) diff --git a/resource/opentelemetry-resource-detector-azure/src/opentelemetry/resource/detector/azure/version.py b/resource/opentelemetry-resource-detector-azure/src/opentelemetry/resource/detector/azure/version.py index 2d2443baa6..3e15120575 100644 --- a/resource/opentelemetry-resource-detector-azure/src/opentelemetry/resource/detector/azure/version.py +++ b/resource/opentelemetry-resource-detector-azure/src/opentelemetry/resource/detector/azure/version.py @@ -12,4 +12,4 @@ # See the License for the specific language governing permissions and # limitations under the License. -__version__ = "0.1.6.dev" +__version__ = "0.2.0.dev" From 50471c8b31160b4c2be55d266a12d2ff8ddd37f4 Mon Sep 17 00:00:00 2001 From: Liudmila Molkova Date: Thu, 19 Sep 2024 16:52:00 -0700 Subject: [PATCH 08/25] Update build_a_package.sh --- scripts/build_a_package.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/build_a_package.sh b/scripts/build_a_package.sh index a19cc9c610..4ca60742a2 100755 --- a/scripts/build_a_package.sh +++ b/scripts/build_a_package.sh @@ -68,10 +68,10 @@ echo "Checking if $pkg_tar_gz_file exists in dist/ directory." # print the list of files in current directory echo $(ls) -if ! [ -f $pkg_tar_gz_file ]; then - echo 'Error! Tag version does not match version built using latest package files.' - exit 1 -fi +#if ! [ -f $pkg_tar_gz_file ]; then +# echo 'Error! Tag version does not match version built using latest package files.' +# exit 1 +#fi # Build a wheel for the source distribution pip wheel --no-deps $pkg_tar_gz_file From f62ee18354e452317097ecbec1c02dcd5e561893 Mon Sep 17 00:00:00 2001 From: opentelemetrybot <107717825+opentelemetrybot@users.noreply.github.com> Date: Thu, 19 Sep 2024 23:58:04 +0000 Subject: [PATCH 09/25] Copy changelog updates from package-release/opentelemetry-resource-detector-azure/v0.1.x --- resource/opentelemetry-resource-detector-azure/CHANGELOG.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/resource/opentelemetry-resource-detector-azure/CHANGELOG.md b/resource/opentelemetry-resource-detector-azure/CHANGELOG.md index dbe1a908ed..2c9ffb9027 100644 --- a/resource/opentelemetry-resource-detector-azure/CHANGELOG.md +++ b/resource/opentelemetry-resource-detector-azure/CHANGELOG.md @@ -9,6 +9,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## Version 0.1.6 (2024-09-19) +- Ensure consistently use of suppress_instrumentation utils + ([#2590](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2590)) + +## Version 0.1.6 (2024-09-19) + - Ensure consistently use of suppress_instrumentation utils ([#2590](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2590)) From c9175eac86b75f68c49cbf6e6d1c5e78023cce70 Mon Sep 17 00:00:00 2001 From: Liudmila Molkova Date: Thu, 19 Sep 2024 17:33:38 -0700 Subject: [PATCH 10/25] up --- .github/workflows/package-prepare-patch-release.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/package-prepare-patch-release.yml b/.github/workflows/package-prepare-patch-release.yml index ae18235797..fcdc2add60 100644 --- a/.github/workflows/package-prepare-patch-release.yml +++ b/.github/workflows/package-prepare-patch-release.yml @@ -74,7 +74,7 @@ jobs: - name: Update version run: | - # replace the version in the version.py file (1.2.3dev -> 1.3.3.dev) + # replace the version in the version.py file (1.2.3 -> 1.2.4) sed -i -E "s/__version__\s*=\s*\"${VERSION}\"/__version__ = \"${NEXT_VERSION}\"/g" $VERSION_FILE - name: Set up Python 3.9 @@ -90,7 +90,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} + sed -Ei "s/^## Unreleased$/## Unreleased\n\n## Version ${NEXT_VERSION} ($date)/" ${CHANGELOG} - name: Use CLA approved github bot run: .github/scripts/use-cla-approved-github-bot.sh @@ -101,7 +101,7 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | message="Prepare patch release for ${PACKAGE_NAME} v${NEXT_VERSION}" - branch="opentelemetrybot/prepare-patch-${GITHUB_REF_NAME}" + branch="opentelemetrybot/patch-${PACKAGE_NAME}-version-to-v${NEXT_VERSION}" git commit -a -m "$message" git push origin HEAD:$branch From 294878b81927dd5bffca4ec50d796c9761e459b0 Mon Sep 17 00:00:00 2001 From: Liudmila Molkova Date: Thu, 19 Sep 2024 17:42:19 -0700 Subject: [PATCH 11/25] lint --- scripts/build_a_package.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/build_a_package.sh b/scripts/build_a_package.sh index 4ca60742a2..477cfdccd4 100755 --- a/scripts/build_a_package.sh +++ b/scripts/build_a_package.sh @@ -66,7 +66,7 @@ pkg_tar_gz_file=`echo $pkg_name | sed 's/-/_/g'`-${pkg_version}.tar.gz echo "Checking if $pkg_tar_gz_file exists in dist/ directory." # print the list of files in current directory -echo $(ls) +echo "$(ls)" #if ! [ -f $pkg_tar_gz_file ]; then # echo 'Error! Tag version does not match version built using latest package files.' From 76a5d7059c777d6d2eefed569974a48c67ef30bc Mon Sep 17 00:00:00 2001 From: Liudmila Molkova Date: Sun, 22 Sep 2024 12:21:22 -0700 Subject: [PATCH 12/25] review and reuse notes/changelog script across workflows --- .../package-prepare-patch-release.yml | 7 +- .github/workflows/package-prepare-release.yml | 7 +- .github/workflows/package-release.yml | 2 +- .github/workflows/release.yml | 64 ++----------------- RELEASING.md | 2 +- scripts/build_a_package.sh | 14 ++-- scripts/generate_release_notes.sh | 2 + scripts/merge_changelog_to_main.sh | 2 + 8 files changed, 32 insertions(+), 68 deletions(-) diff --git a/.github/workflows/package-prepare-patch-release.yml b/.github/workflows/package-prepare-patch-release.yml index fcdc2add60..42fd68f60d 100644 --- a/.github/workflows/package-prepare-patch-release.yml +++ b/.github/workflows/package-prepare-patch-release.yml @@ -26,8 +26,13 @@ jobs: path=./$(./scripts/eachdist.py find-package --package ${{ inputs.package }}) changelog=$path/CHANGELOG.md + if [ ! -f $changelog ]; then + echo "missing $changelog file" + exit 1 + fi + if ! grep --quiet "^## Unreleased$" CHANGELOG.md; then - echo the change log is missing an \"Unreleased\" section + echo the $changelog is missing an \"Unreleased\" section exit 1 fi diff --git a/.github/workflows/package-prepare-release.yml b/.github/workflows/package-prepare-release.yml index 019cd0f217..d54f73a41a 100644 --- a/.github/workflows/package-prepare-release.yml +++ b/.github/workflows/package-prepare-release.yml @@ -34,8 +34,13 @@ jobs: path=./$(./scripts/eachdist.py find-package --package ${{ inputs.package }}) changelog=$path/CHANGELOG.md + if [ ! -f $changelog ]; then + echo "missing $changelog file" + exit 1 + fi + if ! grep --quiet "^## Unreleased$" $changelog; then - echo the change log is missing an \"Unreleased\" section + echo the $changelog is missing an \"Unreleased\" section exit 1 fi diff --git a/.github/workflows/package-release.yml b/.github/workflows/package-release.yml index 3640df959b..98e74fd777 100644 --- a/.github/workflows/package-release.yml +++ b/.github/workflows/package-release.yml @@ -139,7 +139,7 @@ jobs: run: | message="Copy changelog updates from $GITHUB_REF_NAME" body="Copy changelog updates from \`$GITHUB_REF_NAME\`." - branch="opentelemetrybot/copy-change-log-updates-from-${GITHUB_REF_NAME//\//-}" + branch="opentelemetrybot/changelog-${GITHUB_REF_NAME//\//-}" if [[ -z $PRIOR_VERSION_WHEN_PATCH ]]; then if git diff --quiet; then diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index ec544b43c8..75f820172b 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -101,23 +101,10 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | - # conditional block not indented because of the heredoc - if [[ ! -z $PRIOR_VERSION_WHEN_PATCH ]]; then - cat > /tmp/release-notes.txt << EOF - This is a patch release on the previous $PRIOR_VERSION_WHEN_PATCH release, fixing the issue(s) below. + CHANGELOG=CHANGELOG.md + VERSION=${STABLE_VERSION}\/${UNSTABLE_VERSION} - 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 ${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 - # while release notes render them as line breaks - perl -0pe 's/(?> /tmp/release-notes.txt + ./scripts/generate_release_notes.sh - name: Create GitHub release env: @@ -138,47 +125,10 @@ jobs: 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$STABLE_VERSION --json publishedAt --jq .publishedAt | sed 's/T.*//') - 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 ${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 ${STABLE_VERSION}\/${UNSTABLE_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$STABLE_VERSION --json publishedAt --jq .publishedAt | sed 's/T.*//') - echo "## Version ${STABLE_VERSION}/${UNSTABLE_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 + VERSION=${STABLE_VERSION}\/${UNSTABLE_VERSION} + CHANGELOG=CHANGELOG.md + RELEASE_TAG=$STABLE_VERSION + ./scripts/merge_changelog_to_main.sh - name: Use CLA approved github bot run: .github/scripts/use-cla-approved-github-bot.sh diff --git a/RELEASING.md b/RELEASING.md index 825244d813..c1c923b705 100644 --- a/RELEASING.md +++ b/RELEASING.md @@ -73,7 +73,7 @@ The workflow can only be run against long-term release branch such as `package-r > > These libraries are also excluded from the general patch release. -Per-package patch release preparation is handled by the [`[Package] Release`](./.github/workflows/package-release.yml) workflow that allows +Per-package release is handled by the [`[Package] Release`](./.github/workflows/package-release.yml) workflow that allows to pick a specific package to release. The workflow can only be run against long-term release branch such as `package-release/{package-name}/v{major}.{minor}.x` or `package-release/{package-name}/v{major}.{minor}bx`. diff --git a/scripts/build_a_package.sh b/scripts/build_a_package.sh index 477cfdccd4..e5642dbd09 100755 --- a/scripts/build_a_package.sh +++ b/scripts/build_a_package.sh @@ -14,9 +14,9 @@ # See the License for the specific language governing permissions and # limitations under the License. -# This script builds wheels for a single package when triggered from a push to -# a tag as part of a GitHub workflow (See .github/publish-a-package.yml). The -# wheel is then published to PyPI. +# This script builds wheels for a single package when triggered from per-package release +# GitHub workflow (see .github/package-release.yml). +# The wheel is then published to PyPI by the workflow. set -ev @@ -68,10 +68,10 @@ echo "Checking if $pkg_tar_gz_file exists in dist/ directory." # print the list of files in current directory echo "$(ls)" -#if ! [ -f $pkg_tar_gz_file ]; then -# echo 'Error! Tag version does not match version built using latest package files.' -# exit 1 -#fi +if ! [ -f $pkg_tar_gz_file ]; then + echo 'Error! Tag version does not match version built using latest package files.' + exit 1 +fi # Build a wheel for the source distribution pip wheel --no-deps $pkg_tar_gz_file diff --git a/scripts/generate_release_notes.sh b/scripts/generate_release_notes.sh index 47c9a4658a..193e624174 100755 --- a/scripts/generate_release_notes.sh +++ b/scripts/generate_release_notes.sh @@ -5,6 +5,8 @@ # It also stores them in a /tmp/CHANGELOG_SECTION.md which is used later to copy them over to the # CHANGELOG in main branch which is done by merge_changelog_to_main script. +# This script is called from the release workflows (package-release.yml and release.yml). + set -ev # conditional block not indented because of the heredoc diff --git a/scripts/merge_changelog_to_main.sh b/scripts/merge_changelog_to_main.sh index b96ad30db4..ee7d027c97 100755 --- a/scripts/merge_changelog_to_main.sh +++ b/scripts/merge_changelog_to_main.sh @@ -3,6 +3,8 @@ # This script copies release notes for the current version from CHANGELOG.md file # and stores them in a temporary file for later use in the release workflow +# This script is called from the release workflows (package-release.yml and release.yml). + set -ev if [[ -z $PRIOR_VERSION_WHEN_PATCH ]]; then From bcd66a782afc5122a4d5d9a35c6915d613af28bb Mon Sep 17 00:00:00 2001 From: Liudmila Molkova Date: Sun, 22 Sep 2024 13:27:38 -0700 Subject: [PATCH 13/25] some fixes --- .github/workflows/package-prepare-patch-release.yml | 2 +- .github/workflows/package-prepare-release.yml | 4 ++-- .github/workflows/package-release.yml | 2 +- .github/workflows/prepare-patch-release.yml | 2 +- .github/workflows/release.yml | 11 ++++------- 5 files changed, 9 insertions(+), 12 deletions(-) diff --git a/.github/workflows/package-prepare-patch-release.yml b/.github/workflows/package-prepare-patch-release.yml index 42fd68f60d..78abb63cee 100644 --- a/.github/workflows/package-prepare-patch-release.yml +++ b/.github/workflows/package-prepare-patch-release.yml @@ -103,7 +103,7 @@ jobs: - name: Create pull request env: # not using secrets.GITHUB_TOKEN since pull requests from that token do not run workflows - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + GITHUB_TOKEN: ${{ secrets.OPENTELEMETRYBOT_GITHUB_TOKEN }} run: | message="Prepare patch release for ${PACKAGE_NAME} v${NEXT_VERSION}" branch="opentelemetrybot/patch-${PACKAGE_NAME}-version-to-v${NEXT_VERSION}" diff --git a/.github/workflows/package-prepare-release.yml b/.github/workflows/package-prepare-release.yml index d54f73a41a..6c63f5ef6c 100644 --- a/.github/workflows/package-prepare-release.yml +++ b/.github/workflows/package-prepare-release.yml @@ -128,7 +128,7 @@ jobs: - name: Create pull request against the release branch env: # not using secrets.GITHUB_TOKEN since pull requests from that token do not run workflows - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + GITHUB_TOKEN: ${{ secrets.OPENTELEMETRYBOT_GITHUB_TOKEN }} run: | message="Prepare release for ${PACKAGE_NAME} v${VERSION}" branch="opentelemetrybot/prepare-${RELEASE_BRANCH_NAME}" @@ -180,7 +180,7 @@ jobs: - name: Create pull request against main env: # not using secrets.GITHUB_TOKEN since pull requests from that token do not run workflows - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + GITHUB_TOKEN: ${{ secrets.OPENTELEMETRYBOT_GITHUB_TOKEN }} run: | message="Update ${PACKAGE_NAME} version to v${NEXT_VERSION}" body="Update \`${PACKAGE_NAME}\` version to v\`${NEXT_VERSION}\`." diff --git a/.github/workflows/package-release.yml b/.github/workflows/package-release.yml index 98e74fd777..823f2c83d2 100644 --- a/.github/workflows/package-release.yml +++ b/.github/workflows/package-release.yml @@ -135,7 +135,7 @@ jobs: - name: Create pull request against main env: # not using secrets.GITHUB_TOKEN since pull requests from that token do not run workflows - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + GITHUB_TOKEN: ${{ secrets.OPENTELEMETRYBOT_GITHUB_TOKEN }} run: | message="Copy changelog updates from $GITHUB_REF_NAME" body="Copy changelog updates from \`$GITHUB_REF_NAME\`." diff --git a/.github/workflows/prepare-patch-release.yml b/.github/workflows/prepare-patch-release.yml index 79a9acf887..7c854d436d 100644 --- a/.github/workflows/prepare-patch-release.yml +++ b/.github/workflows/prepare-patch-release.yml @@ -69,7 +69,7 @@ jobs: - name: Create pull request env: # not using secrets.GITHUB_TOKEN since pull requests from that token do not run workflows - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + GITHUB_TOKEN: ${{ secrets.OPENTELEMETRYBOT_GITHUB_TOKEN }} run: | message="Prepare release ${STABLE_VERSION}/${UNSTABLE_VERSION}" branch="opentelemetrybot/prepare-release-${STABLE_VERSION}-${UNSTABLE_VERSION}" diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 75f820172b..964d6f93df 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -42,7 +42,7 @@ jobs: echo "STABLE_VERSION=$stable_version" >> $GITHUB_ENV echo "UNSTABLE_VERSION=$unstable_version" >> $GITHUB_ENV - + echo "CHANGELOG=CHANGELOG.md" >> $GITHUB_ENV echo "PRIOR_VERSION_WHEN_PATCH=$prior_version_when_patch" >> $GITHUB_ENV - run: | @@ -101,9 +101,7 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | - CHANGELOG=CHANGELOG.md - VERSION=${STABLE_VERSION}\/${UNSTABLE_VERSION} - + echo "VERSION=${STABLE_VERSION}\/${UNSTABLE_VERSION}" >> $GITHUB_ENV ./scripts/generate_release_notes.sh - name: Create GitHub release @@ -125,9 +123,8 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | - VERSION=${STABLE_VERSION}\/${UNSTABLE_VERSION} - CHANGELOG=CHANGELOG.md - RELEASE_TAG=$STABLE_VERSION + echo "VERSION=${STABLE_VERSION}\/${UNSTABLE_VERSION}" >> $GITHUB_ENV + echo "RELEASE_TAG=$STABLE_VERSION" >> $GITHUB_ENV ./scripts/merge_changelog_to_main.sh - name: Use CLA approved github bot From 0b6585a40e7de4f8eee56a80a7bcfa535bcf48d5 Mon Sep 17 00:00:00 2001 From: Liudmila Molkova Date: Sun, 22 Sep 2024 13:31:39 -0700 Subject: [PATCH 14/25] undo test changes --- .../opentelemetry-resource-detector-azure/CHANGELOG.md | 5 ----- resource/opentelemetry-resource-detector-azure/README.rst | 8 ++++---- .../opentelemetry-resource-detector-azure/pyproject.toml | 2 +- .../test-requirements.txt | 2 +- tox.ini | 2 +- 5 files changed, 7 insertions(+), 12 deletions(-) diff --git a/resource/opentelemetry-resource-detector-azure/CHANGELOG.md b/resource/opentelemetry-resource-detector-azure/CHANGELOG.md index 2c9ffb9027..dbe1a908ed 100644 --- a/resource/opentelemetry-resource-detector-azure/CHANGELOG.md +++ b/resource/opentelemetry-resource-detector-azure/CHANGELOG.md @@ -9,11 +9,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## Version 0.1.6 (2024-09-19) -- Ensure consistently use of suppress_instrumentation utils - ([#2590](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2590)) - -## Version 0.1.6 (2024-09-19) - - Ensure consistently use of suppress_instrumentation utils ([#2590](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2590)) diff --git a/resource/opentelemetry-resource-detector-azure/README.rst b/resource/opentelemetry-resource-detector-azure/README.rst index 03d6749ae6..19a0f97f32 100644 --- a/resource/opentelemetry-resource-detector-azure/README.rst +++ b/resource/opentelemetry-resource-detector-azure/README.rst @@ -3,8 +3,8 @@ OpenTelemetry Resource detectors for Azure |pypi| -.. |pypi| image:: https://badge.fury.io/py/lmolkova-opentelemetry-resource-detector-azure.svg - :target: https://pypi.org/project/lmolkova-opentelemetry-resource-detector-azure/ +.. |pypi| image:: https://badge.fury.io/py/opentelemetry-resource-detector-azure.svg + :target: https://pypi.org/project/opentelemetry-resource-detector-azure/ This library contains OpenTelemetry `Resource Detectors `_ for the following Azure resources: * `Azure App Service `_ @@ -16,11 +16,11 @@ Installation :: - pip install lmolkova-opentelemetry-resource-detector-azure + pip install opentelemetry-resource-detector-azure --------------------------- -Usage example for ``lmolkova-opentelemetry-resource-detector-azure`` +Usage example for ``opentelemetry-resource-detector-azure`` .. code-block:: python diff --git a/resource/opentelemetry-resource-detector-azure/pyproject.toml b/resource/opentelemetry-resource-detector-azure/pyproject.toml index b8bbd4dce5..14952b751c 100644 --- a/resource/opentelemetry-resource-detector-azure/pyproject.toml +++ b/resource/opentelemetry-resource-detector-azure/pyproject.toml @@ -3,7 +3,7 @@ requires = ["hatchling"] build-backend = "hatchling.build" [project] -name = "lmolkova-opentelemetry-resource-detector-azure" +name = "opentelemetry-resource-detector-azure" dynamic = ["version"] description = "Azure Resource Detector for OpenTelemetry" readme = "README.rst" diff --git a/resource/opentelemetry-resource-detector-azure/test-requirements.txt b/resource/opentelemetry-resource-detector-azure/test-requirements.txt index 1f7a2de395..fe04c99490 100644 --- a/resource/opentelemetry-resource-detector-azure/test-requirements.txt +++ b/resource/opentelemetry-resource-detector-azure/test-requirements.txt @@ -10,4 +10,4 @@ typing_extensions==4.12.2 wrapt==1.16.0 zipp==3.19.2 -e opentelemetry-instrumentation --e resource/lmolkova-opentelemetry-resource-detector-azure +-e resource/opentelemetry-resource-detector-azure diff --git a/tox.ini b/tox.ini index 5d1dd8206c..2b0995d8fc 100644 --- a/tox.ini +++ b/tox.ini @@ -11,7 +11,7 @@ envlist = pypy3-test-resource-detector-container lint-resource-detector-container - ; lmolkova-opentelemetry-resource-detector-azure + ; opentelemetry-resource-detector-azure py3{8,9,10,11,12}-test-resource-detector-azure pypy3-test-resource-detector-azure lint-resource-detector-azure From a745b7d928cec225a2234138aa9c247cd86753bd Mon Sep 17 00:00:00 2001 From: Liudmila Molkova Date: Sun, 22 Sep 2024 13:34:31 -0700 Subject: [PATCH 15/25] clean up --- .../src/opentelemetry/propagators/aws/version.py | 2 +- resource/opentelemetry-resource-detector-azure/CHANGELOG.md | 2 -- .../src/opentelemetry/sdk/extension/aws/version.py | 2 +- 3 files changed, 2 insertions(+), 4 deletions(-) diff --git a/propagator/opentelemetry-propagator-aws-xray/src/opentelemetry/propagators/aws/version.py b/propagator/opentelemetry-propagator-aws-xray/src/opentelemetry/propagators/aws/version.py index 1447ffcc1e..12da797c60 100644 --- a/propagator/opentelemetry-propagator-aws-xray/src/opentelemetry/propagators/aws/version.py +++ b/propagator/opentelemetry-propagator-aws-xray/src/opentelemetry/propagators/aws/version.py @@ -12,4 +12,4 @@ # See the License for the specific language governing permissions and # limitations under the License. -__version__ = "1.0.3.dev" +__version__ = "1.1.0.dev" diff --git a/resource/opentelemetry-resource-detector-azure/CHANGELOG.md b/resource/opentelemetry-resource-detector-azure/CHANGELOG.md index dbe1a908ed..5e16c83d63 100644 --- a/resource/opentelemetry-resource-detector-azure/CHANGELOG.md +++ b/resource/opentelemetry-resource-detector-azure/CHANGELOG.md @@ -7,8 +7,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## Unreleased -## Version 0.1.6 (2024-09-19) - - Ensure consistently use of suppress_instrumentation utils ([#2590](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2590)) diff --git a/sdk-extension/opentelemetry-sdk-extension-aws/src/opentelemetry/sdk/extension/aws/version.py b/sdk-extension/opentelemetry-sdk-extension-aws/src/opentelemetry/sdk/extension/aws/version.py index 0723dc818d..b065755302 100644 --- a/sdk-extension/opentelemetry-sdk-extension-aws/src/opentelemetry/sdk/extension/aws/version.py +++ b/sdk-extension/opentelemetry-sdk-extension-aws/src/opentelemetry/sdk/extension/aws/version.py @@ -12,4 +12,4 @@ # See the License for the specific language governing permissions and # limitations under the License. -__version__ = "2.0.3.dev" +__version__ = "2.1.0.dev" From 6505ad8b00d23f26ddc98acb4038d9cce96446f6 Mon Sep 17 00:00:00 2001 From: Liudmila Molkova Date: Mon, 23 Sep 2024 22:00:57 -0700 Subject: [PATCH 16/25] try me --- CHANGELOG.md | 2 +- .../opentelemetry-instrumentation-aws-lambda/pyproject.toml | 2 +- .../opentelemetry-instrumentation-botocore/pyproject.toml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e181b6699b..94b6c22af8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,7 +6,7 @@ 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). > [!NOTE] -> Some following components are released independently and maintain individual CHANGELOG files. +> The following components are released independently and maintain individual CHANGELOG files. > Use [this search for a list of all CHANGELOG.md files in this repo](https://github.com/search?q=repo%3Aopen-telemetry%2Fopentelemetry-python-contrib+path%3A**%2FCHANGELOG.md&type=code). ## Unreleased diff --git a/instrumentation/opentelemetry-instrumentation-aws-lambda/pyproject.toml b/instrumentation/opentelemetry-instrumentation-aws-lambda/pyproject.toml index debc3ce033..6c1aad7d23 100644 --- a/instrumentation/opentelemetry-instrumentation-aws-lambda/pyproject.toml +++ b/instrumentation/opentelemetry-instrumentation-aws-lambda/pyproject.toml @@ -26,8 +26,8 @@ classifiers = [ ] dependencies = [ "opentelemetry-instrumentation == 0.49b0.dev", - "opentelemetry-propagator-aws-xray ~= 1.0.1", "opentelemetry-semantic-conventions == 0.49b0.dev", + "opentelemetry-propagator-aws-xray ~= 1.0", ] [project.optional-dependencies] diff --git a/instrumentation/opentelemetry-instrumentation-botocore/pyproject.toml b/instrumentation/opentelemetry-instrumentation-botocore/pyproject.toml index 797145b728..dae5b29661 100644 --- a/instrumentation/opentelemetry-instrumentation-botocore/pyproject.toml +++ b/instrumentation/opentelemetry-instrumentation-botocore/pyproject.toml @@ -28,7 +28,7 @@ dependencies = [ "opentelemetry-api ~= 1.12", "opentelemetry-instrumentation == 0.49b0.dev", "opentelemetry-semantic-conventions == 0.49b0.dev", - "opentelemetry-propagator-aws-xray ~= 1.0.1", + "opentelemetry-propagator-aws-xray ~= 1.0", ] [project.optional-dependencies] From 6dfd9025c84bb5cc6ba7bed655d8a529fd7d517c Mon Sep 17 00:00:00 2001 From: Liudmila Molkova Date: Wed, 25 Sep 2024 15:30:09 -0700 Subject: [PATCH 17/25] support version.py and version/__init__.py files --- .github/workflows/package-prepare-patch-release.yml | 6 +++--- .github/workflows/package-prepare-release.yml | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/package-prepare-patch-release.yml b/.github/workflows/package-prepare-patch-release.yml index 78abb63cee..a3c9bf58f2 100644 --- a/.github/workflows/package-prepare-patch-release.yml +++ b/.github/workflows/package-prepare-patch-release.yml @@ -38,11 +38,11 @@ jobs: version=$(./scripts/eachdist.py version --package ${{ inputs.package }}) - version_file=$(find $path -type f -name "version.py") + version_file=$(find $path -type f -path "version*.py") file_count=$(echo "$version_file" | wc -l) if [ "$file_count" -ne 1 ]; then - echo "Error: expected one version.py file, found $file_count" + echo "Error: expected one version file, found $file_count" echo "$version_file" exit 1 fi @@ -79,7 +79,7 @@ jobs: - name: Update version run: | - # replace the version in the version.py file (1.2.3 -> 1.2.4) + # replace the version in the version file (1.2.3 -> 1.2.4) sed -i -E "s/__version__\s*=\s*\"${VERSION}\"/__version__ = \"${NEXT_VERSION}\"/g" $VERSION_FILE - name: Set up Python 3.9 diff --git a/.github/workflows/package-prepare-release.yml b/.github/workflows/package-prepare-release.yml index 6c63f5ef6c..a447edbabc 100644 --- a/.github/workflows/package-prepare-release.yml +++ b/.github/workflows/package-prepare-release.yml @@ -53,11 +53,11 @@ jobs: version=${version_dev%.dev} - version_file=$(find $path -type f -name "version.py") + version_file=$(find $path -type f -path "version*.py") file_count=$(echo "$version_file" | wc -l) if [ "$file_count" -ne 1 ]; then - echo "Error: expected one version.py file, found $file_count" + echo "Error: expected one version file, found $file_count" echo "$version_file" exit 1 fi @@ -105,7 +105,7 @@ jobs: - name: Update package version run: | - # replace the version in the version.py file (1.2.3dev -> 1.2.3) + # replace the version in the version file (1.2.3dev -> 1.2.3) sed -i -E "s/__version__\s*=\s*\"${VERSION}\.dev\"/__version__ = \"${VERSION}\"/g" $VERSION_FILE - name: Set up Python 3.9 @@ -156,7 +156,7 @@ jobs: - name: Update version run: | - # replace the version in the version.py file (1.2.3dev -> 1.3.3.dev) + # replace the version in the version file (1.2.3dev -> 1.3.3.dev) sed -i -E "s/__version__\s*=\s*\"${VERSION}\.dev\"/__version__ = \"${NEXT_VERSION}.dev\"/g" $VERSION_FILE - name: Set up Python 3.9 From 3da5ac8dd13896fe3db4a96ec7d5972c1d8f3242 Mon Sep 17 00:00:00 2001 From: Liudmila Molkova Date: Thu, 26 Sep 2024 09:59:23 -0700 Subject: [PATCH 18/25] test instr version --- .../django/version/__init__.py | 15 ++ .../LICENSE | 201 ++++++++++++++++++ .../README.rst | 25 +++ .../pyproject.toml | 49 +++++ .../instrumentation/wsgi/__init__.py | 17 ++ .../instrumentation/wsgi/package.py | 20 ++ .../instrumentation/wsgi/version.py | 15 ++ .../test-requirements.txt | 14 ++ .../tests/__init__.py | 23 ++ 9 files changed, 379 insertions(+) create mode 100644 instrumentation/opentelemetry-instrumentation-django/src/opentelemetry/instrumentation/django/version/__init__.py create mode 100644 instrumentation/opentelemetry-instrumentation-test/LICENSE create mode 100644 instrumentation/opentelemetry-instrumentation-test/README.rst create mode 100644 instrumentation/opentelemetry-instrumentation-test/pyproject.toml create mode 100644 instrumentation/opentelemetry-instrumentation-test/src/opentelemetry/instrumentation/wsgi/__init__.py create mode 100644 instrumentation/opentelemetry-instrumentation-test/src/opentelemetry/instrumentation/wsgi/package.py create mode 100644 instrumentation/opentelemetry-instrumentation-test/src/opentelemetry/instrumentation/wsgi/version.py create mode 100644 instrumentation/opentelemetry-instrumentation-test/test-requirements.txt create mode 100644 instrumentation/opentelemetry-instrumentation-test/tests/__init__.py diff --git a/instrumentation/opentelemetry-instrumentation-django/src/opentelemetry/instrumentation/django/version/__init__.py b/instrumentation/opentelemetry-instrumentation-django/src/opentelemetry/instrumentation/django/version/__init__.py new file mode 100644 index 0000000000..ee5a6342e7 --- /dev/null +++ b/instrumentation/opentelemetry-instrumentation-django/src/opentelemetry/instrumentation/django/version/__init__.py @@ -0,0 +1,15 @@ +# Copyright The OpenTelemetry Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +__version__ = "0.49b0.dev" diff --git a/instrumentation/opentelemetry-instrumentation-test/LICENSE b/instrumentation/opentelemetry-instrumentation-test/LICENSE new file mode 100644 index 0000000000..261eeb9e9f --- /dev/null +++ b/instrumentation/opentelemetry-instrumentation-test/LICENSE @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/instrumentation/opentelemetry-instrumentation-test/README.rst b/instrumentation/opentelemetry-instrumentation-test/README.rst new file mode 100644 index 0000000000..fe5aeea554 --- /dev/null +++ b/instrumentation/opentelemetry-instrumentation-test/README.rst @@ -0,0 +1,25 @@ +OpenTelemetry TEst Middleware +============================= + +|pypi| + +.. |pypi| image:: https://badge.fury.io/py/opentelemetry-instrumentation-test.svg + :target: https://pypi.org/project/opentelemetry-instrumentation-test/ + + +This library provides a test middleware that can be used on any test framework. + +Installation +------------ + +:: + + pip install opentelemetry-instrumentation-test + +References +---------- + +* `OpenTelemetry TEst Middleware `_ +* `OpenTelemetry Project `_ +* `WSGI `_ +* `OpenTelemetry Python Examples `_ diff --git a/instrumentation/opentelemetry-instrumentation-test/pyproject.toml b/instrumentation/opentelemetry-instrumentation-test/pyproject.toml new file mode 100644 index 0000000000..78e12624d0 --- /dev/null +++ b/instrumentation/opentelemetry-instrumentation-test/pyproject.toml @@ -0,0 +1,49 @@ +[build-system] +requires = ["hatchling"] +build-backend = "hatchling.build" + +[project] +name = "opentelemetry-instrumentation-test" +dynamic = ["version"] +description = "test Middleware for OpenTelemetry" +readme = "README.rst" +license = "Apache-2.0" +requires-python = ">=3.8" +authors = [ + { name = "OpenTelemetry Authors", email = "cncf-opentelemetry-contributors@lists.cncf.io" }, +] +classifiers = [ + "Development Status :: 4 - Beta", + "Intended Audience :: Developers", + "License :: OSI Approved :: Apache Software License", + "Programming Language :: Python", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.8", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", +] +dependencies = [ + "opentelemetry-api ~= 1.12", + "opentelemetry-instrumentation ~= 0.47b0", + "opentelemetry-semantic-conventions == 0.47b0", +] + +[project.optional-dependencies] +instruments = [] + +[project.urls] +Homepage = "https://github.com/open-telemetry/opentelemetry-python-contrib/tree/main/instrumentation/opentelemetry-instrumentation-test" + +[tool.hatch.version] +path = "src/opentelemetry/instrumentation/test/version.py" + +[tool.hatch.build.targets.sdist] +include = [ + "/src", + "/tests", +] + +[tool.hatch.build.targets.wheel] +packages = ["src/opentelemetry"] diff --git a/instrumentation/opentelemetry-instrumentation-test/src/opentelemetry/instrumentation/wsgi/__init__.py b/instrumentation/opentelemetry-instrumentation-test/src/opentelemetry/instrumentation/wsgi/__init__.py new file mode 100644 index 0000000000..3401275a73 --- /dev/null +++ b/instrumentation/opentelemetry-instrumentation-test/src/opentelemetry/instrumentation/wsgi/__init__.py @@ -0,0 +1,17 @@ +# Copyright The OpenTelemetry Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +""" +This library provides a WSGI middleware that can be used on any WSGI framework +(such as Django / Flask / Web.py) to track requests timing through OpenTelemetry. +""" diff --git a/instrumentation/opentelemetry-instrumentation-test/src/opentelemetry/instrumentation/wsgi/package.py b/instrumentation/opentelemetry-instrumentation-test/src/opentelemetry/instrumentation/wsgi/package.py new file mode 100644 index 0000000000..361eac89c9 --- /dev/null +++ b/instrumentation/opentelemetry-instrumentation-test/src/opentelemetry/instrumentation/wsgi/package.py @@ -0,0 +1,20 @@ +# Copyright The OpenTelemetry Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +_instruments = tuple() + +_supports_metrics = False + +_semconv_status = "migration" diff --git a/instrumentation/opentelemetry-instrumentation-test/src/opentelemetry/instrumentation/wsgi/version.py b/instrumentation/opentelemetry-instrumentation-test/src/opentelemetry/instrumentation/wsgi/version.py new file mode 100644 index 0000000000..0d3adda0a2 --- /dev/null +++ b/instrumentation/opentelemetry-instrumentation-test/src/opentelemetry/instrumentation/wsgi/version.py @@ -0,0 +1,15 @@ +# Copyright The OpenTelemetry Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +__version__ = "1.0.0b.dev" diff --git a/instrumentation/opentelemetry-instrumentation-test/test-requirements.txt b/instrumentation/opentelemetry-instrumentation-test/test-requirements.txt new file mode 100644 index 0000000000..743026e94a --- /dev/null +++ b/instrumentation/opentelemetry-instrumentation-test/test-requirements.txt @@ -0,0 +1,14 @@ +asgiref==3.8.1 +Deprecated==1.2.14 +importlib-metadata==6.11.0 +iniconfig==2.0.0 +packaging==24.0 +pluggy==1.5.0 +py-cpuinfo==9.0.0 +pytest==7.4.4 +tomli==2.0.1 +typing_extensions==4.9.0 +wrapt==1.16.0 +zipp==3.19.2 +opentelemetry-instrumentation==0.48b0 +-e instrumentation/opentelemetry-instrumentation-test diff --git a/instrumentation/opentelemetry-instrumentation-test/tests/__init__.py b/instrumentation/opentelemetry-instrumentation-test/tests/__init__.py new file mode 100644 index 0000000000..a0b2062b52 --- /dev/null +++ b/instrumentation/opentelemetry-instrumentation-test/tests/__init__.py @@ -0,0 +1,23 @@ +# Copyright The OpenTelemetry Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +import pkg_resources + +# IMPORTANT: Only the TEst module needs this because it is always the first +# package that uses the `{rootdir}/*/tests/` path and gets installed by +# `eachdist.py` and according to `eachdist.ini`. + +# Naming the tests module as a namespace package ensures that +# relative imports will resolve properly for subsequent test packages, +# as it enables searching for a composite of multiple test modules. +pkg_resources.declare_namespace(__name__) From 08444e8093e985a5bd286238725b6c0790c37c43 Mon Sep 17 00:00:00 2001 From: Liudmila Molkova Date: Thu, 26 Sep 2024 10:00:41 -0700 Subject: [PATCH 19/25] exclude from release --- eachdist.ini | 1 + .../instrumentation/django/version/__init__.py | 15 --------------- 2 files changed, 1 insertion(+), 15 deletions(-) delete mode 100644 instrumentation/opentelemetry-instrumentation-django/src/opentelemetry/instrumentation/django/version/__init__.py diff --git a/eachdist.ini b/eachdist.ini index 79c865b334..950b751685 100644 --- a/eachdist.ini +++ b/eachdist.ini @@ -50,6 +50,7 @@ packages= opentelemetry-resource-detector-azure opentelemetry-sdk-extension-aws opentelemetry-propagator-aws-xray + opentelemetry-instrumentation-test [lintroots] extraroots=examples/*,scripts/ diff --git a/instrumentation/opentelemetry-instrumentation-django/src/opentelemetry/instrumentation/django/version/__init__.py b/instrumentation/opentelemetry-instrumentation-django/src/opentelemetry/instrumentation/django/version/__init__.py deleted file mode 100644 index ee5a6342e7..0000000000 --- a/instrumentation/opentelemetry-instrumentation-django/src/opentelemetry/instrumentation/django/version/__init__.py +++ /dev/null @@ -1,15 +0,0 @@ -# Copyright The OpenTelemetry Authors -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -__version__ = "0.49b0.dev" From 0c729ea90276d4cfcc5f1b0ff894c2744dea1585 Mon Sep 17 00:00:00 2001 From: Liudmila Molkova Date: Thu, 26 Sep 2024 10:29:21 -0700 Subject: [PATCH 20/25] uo --- .../instrumentation/wsgi/__init__.py | 17 ---------------- .../instrumentation/wsgi/package.py | 20 ------------------- .../instrumentation/wsgi/version.py | 15 -------------- 3 files changed, 52 deletions(-) delete mode 100644 instrumentation/opentelemetry-instrumentation-test/src/opentelemetry/instrumentation/wsgi/__init__.py delete mode 100644 instrumentation/opentelemetry-instrumentation-test/src/opentelemetry/instrumentation/wsgi/package.py delete mode 100644 instrumentation/opentelemetry-instrumentation-test/src/opentelemetry/instrumentation/wsgi/version.py diff --git a/instrumentation/opentelemetry-instrumentation-test/src/opentelemetry/instrumentation/wsgi/__init__.py b/instrumentation/opentelemetry-instrumentation-test/src/opentelemetry/instrumentation/wsgi/__init__.py deleted file mode 100644 index 3401275a73..0000000000 --- a/instrumentation/opentelemetry-instrumentation-test/src/opentelemetry/instrumentation/wsgi/__init__.py +++ /dev/null @@ -1,17 +0,0 @@ -# Copyright The OpenTelemetry Authors -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -""" -This library provides a WSGI middleware that can be used on any WSGI framework -(such as Django / Flask / Web.py) to track requests timing through OpenTelemetry. -""" diff --git a/instrumentation/opentelemetry-instrumentation-test/src/opentelemetry/instrumentation/wsgi/package.py b/instrumentation/opentelemetry-instrumentation-test/src/opentelemetry/instrumentation/wsgi/package.py deleted file mode 100644 index 361eac89c9..0000000000 --- a/instrumentation/opentelemetry-instrumentation-test/src/opentelemetry/instrumentation/wsgi/package.py +++ /dev/null @@ -1,20 +0,0 @@ -# Copyright The OpenTelemetry Authors -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -_instruments = tuple() - -_supports_metrics = False - -_semconv_status = "migration" diff --git a/instrumentation/opentelemetry-instrumentation-test/src/opentelemetry/instrumentation/wsgi/version.py b/instrumentation/opentelemetry-instrumentation-test/src/opentelemetry/instrumentation/wsgi/version.py deleted file mode 100644 index 0d3adda0a2..0000000000 --- a/instrumentation/opentelemetry-instrumentation-test/src/opentelemetry/instrumentation/wsgi/version.py +++ /dev/null @@ -1,15 +0,0 @@ -# Copyright The OpenTelemetry Authors -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -__version__ = "1.0.0b.dev" From 1084a01290379cb345edbc5a0bc4b2f858d62e27 Mon Sep 17 00:00:00 2001 From: Liudmila Molkova Date: Thu, 26 Sep 2024 10:33:41 -0700 Subject: [PATCH 21/25] uo --- .../instrumentation/test/__init__.py | 17 ++++++++++++++++ .../instrumentation/test/package.py | 20 +++++++++++++++++++ .../instrumentation/test/version.py | 15 ++++++++++++++ 3 files changed, 52 insertions(+) create mode 100644 instrumentation/opentelemetry-instrumentation-test/src/opentelemetry/instrumentation/test/__init__.py create mode 100644 instrumentation/opentelemetry-instrumentation-test/src/opentelemetry/instrumentation/test/package.py create mode 100644 instrumentation/opentelemetry-instrumentation-test/src/opentelemetry/instrumentation/test/version.py diff --git a/instrumentation/opentelemetry-instrumentation-test/src/opentelemetry/instrumentation/test/__init__.py b/instrumentation/opentelemetry-instrumentation-test/src/opentelemetry/instrumentation/test/__init__.py new file mode 100644 index 0000000000..3401275a73 --- /dev/null +++ b/instrumentation/opentelemetry-instrumentation-test/src/opentelemetry/instrumentation/test/__init__.py @@ -0,0 +1,17 @@ +# Copyright The OpenTelemetry Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +""" +This library provides a WSGI middleware that can be used on any WSGI framework +(such as Django / Flask / Web.py) to track requests timing through OpenTelemetry. +""" diff --git a/instrumentation/opentelemetry-instrumentation-test/src/opentelemetry/instrumentation/test/package.py b/instrumentation/opentelemetry-instrumentation-test/src/opentelemetry/instrumentation/test/package.py new file mode 100644 index 0000000000..361eac89c9 --- /dev/null +++ b/instrumentation/opentelemetry-instrumentation-test/src/opentelemetry/instrumentation/test/package.py @@ -0,0 +1,20 @@ +# Copyright The OpenTelemetry Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +_instruments = tuple() + +_supports_metrics = False + +_semconv_status = "migration" diff --git a/instrumentation/opentelemetry-instrumentation-test/src/opentelemetry/instrumentation/test/version.py b/instrumentation/opentelemetry-instrumentation-test/src/opentelemetry/instrumentation/test/version.py new file mode 100644 index 0000000000..0d3adda0a2 --- /dev/null +++ b/instrumentation/opentelemetry-instrumentation-test/src/opentelemetry/instrumentation/test/version.py @@ -0,0 +1,15 @@ +# Copyright The OpenTelemetry Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +__version__ = "1.0.0b.dev" From 407b8f179a48347c4110a67cf8360afdc67059dd Mon Sep 17 00:00:00 2001 From: Liudmila Molkova Date: Thu, 26 Sep 2024 10:37:08 -0700 Subject: [PATCH 22/25] uo --- .github/workflows/package-prepare-release.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/package-prepare-release.yml b/.github/workflows/package-prepare-release.yml index a447edbabc..e4d34635a0 100644 --- a/.github/workflows/package-prepare-release.yml +++ b/.github/workflows/package-prepare-release.yml @@ -128,7 +128,7 @@ jobs: - name: Create pull request against the release branch env: # not using secrets.GITHUB_TOKEN since pull requests from that token do not run workflows - GITHUB_TOKEN: ${{ secrets.OPENTELEMETRYBOT_GITHUB_TOKEN }} + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | message="Prepare release for ${PACKAGE_NAME} v${VERSION}" branch="opentelemetrybot/prepare-${RELEASE_BRANCH_NAME}" @@ -180,7 +180,7 @@ jobs: - name: Create pull request against main env: # not using secrets.GITHUB_TOKEN since pull requests from that token do not run workflows - GITHUB_TOKEN: ${{ secrets.OPENTELEMETRYBOT_GITHUB_TOKEN }} + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | message="Update ${PACKAGE_NAME} version to v${NEXT_VERSION}" body="Update \`${PACKAGE_NAME}\` version to v\`${NEXT_VERSION}\`." From 595e9b6e14962a33e1d3871f53306c3ce83fdcf6 Mon Sep 17 00:00:00 2001 From: Liudmila Molkova Date: Mon, 7 Oct 2024 16:56:49 -0700 Subject: [PATCH 23/25] up --- .github/workflows/package-prepare-release.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/package-prepare-release.yml b/.github/workflows/package-prepare-release.yml index e4d34635a0..bf70d546ba 100644 --- a/.github/workflows/package-prepare-release.yml +++ b/.github/workflows/package-prepare-release.yml @@ -53,7 +53,7 @@ jobs: version=${version_dev%.dev} - version_file=$(find $path -type f -path "version*.py") + version_file=$(find $path -type f -path "*version*.py") file_count=$(echo "$version_file" | wc -l) if [ "$file_count" -ne 1 ]; then @@ -81,7 +81,7 @@ jobs: echo "version=$version" >> $GITHUB_OUTPUT echo "changelog=$changelog" >> $GITHUB_OUTPUT - echo "version_file=$version_file" >> $GITHUB_OUTPUT + echo "version_file=${version_file[0]}" >> $GITHUB_OUTPUT echo "release_branch_name=$release_branch_name" >> $GITHUB_OUTPUT echo "next_version=$next_version" >> $GITHUB_OUTPUT From b393d204e413bd5fe1122e4724fc2eb58c79449b Mon Sep 17 00:00:00 2001 From: Liudmila Molkova Date: Mon, 7 Oct 2024 17:16:25 -0700 Subject: [PATCH 24/25] clean up --- .github/workflows/package-prepare-patch-release.yml | 2 +- .github/workflows/package-prepare-release.yml | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/package-prepare-patch-release.yml b/.github/workflows/package-prepare-patch-release.yml index a3c9bf58f2..e9cc7d55ba 100644 --- a/.github/workflows/package-prepare-patch-release.yml +++ b/.github/workflows/package-prepare-patch-release.yml @@ -38,7 +38,7 @@ jobs: version=$(./scripts/eachdist.py version --package ${{ inputs.package }}) - version_file=$(find $path -type f -path "version*.py") + version_file=$(find $path -type f -path "*version*.py") file_count=$(echo "$version_file" | wc -l) if [ "$file_count" -ne 1 ]; then diff --git a/.github/workflows/package-prepare-release.yml b/.github/workflows/package-prepare-release.yml index bf70d546ba..61dd1eb971 100644 --- a/.github/workflows/package-prepare-release.yml +++ b/.github/workflows/package-prepare-release.yml @@ -81,7 +81,7 @@ jobs: echo "version=$version" >> $GITHUB_OUTPUT echo "changelog=$changelog" >> $GITHUB_OUTPUT - echo "version_file=${version_file[0]}" >> $GITHUB_OUTPUT + echo "version_file=$version_file" >> $GITHUB_OUTPUT echo "release_branch_name=$release_branch_name" >> $GITHUB_OUTPUT echo "next_version=$next_version" >> $GITHUB_OUTPUT @@ -128,7 +128,7 @@ jobs: - name: Create pull request against the release branch env: # not using secrets.GITHUB_TOKEN since pull requests from that token do not run workflows - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + GITHUB_TOKEN: ${{ secrets.OPENTELEMETRYBOT_GITHUB_TOKEN }} run: | message="Prepare release for ${PACKAGE_NAME} v${VERSION}" branch="opentelemetrybot/prepare-${RELEASE_BRANCH_NAME}" @@ -180,7 +180,7 @@ jobs: - name: Create pull request against main env: # not using secrets.GITHUB_TOKEN since pull requests from that token do not run workflows - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + GITHUB_TOKEN: ${{ secrets.OPENTELEMETRYBOT_GITHUB_TOKEN }} run: | message="Update ${PACKAGE_NAME} version to v${NEXT_VERSION}" body="Update \`${PACKAGE_NAME}\` version to v\`${NEXT_VERSION}\`." From e0b5501877ba6056adc0af2a10f109e48672c9d3 Mon Sep 17 00:00:00 2001 From: Liudmila Molkova Date: Tue, 8 Oct 2024 21:11:56 -0700 Subject: [PATCH 25/25] lint --- instrumentation/README.md | 1 + opentelemetry-contrib-instrumentations/pyproject.toml | 1 + .../src/opentelemetry/instrumentation/bootstrap_gen.py | 1 + 3 files changed, 3 insertions(+) diff --git a/instrumentation/README.md b/instrumentation/README.md index b87bf6f844..6bb47f6f9c 100644 --- a/instrumentation/README.md +++ b/instrumentation/README.md @@ -43,6 +43,7 @@ | [opentelemetry-instrumentation-sqlite3](./opentelemetry-instrumentation-sqlite3) | sqlite3 | No | experimental | [opentelemetry-instrumentation-starlette](./opentelemetry-instrumentation-starlette) | starlette ~= 0.13.0 | Yes | experimental | [opentelemetry-instrumentation-system-metrics](./opentelemetry-instrumentation-system-metrics) | psutil >= 5 | No | experimental +| [opentelemetry-instrumentation-test](./opentelemetry-instrumentation-test) | test | No | migration | [opentelemetry-instrumentation-threading](./opentelemetry-instrumentation-threading) | threading | No | experimental | [opentelemetry-instrumentation-tornado](./opentelemetry-instrumentation-tornado) | tornado >= 5.1.1 | Yes | experimental | [opentelemetry-instrumentation-tortoiseorm](./opentelemetry-instrumentation-tortoiseorm) | tortoise-orm >= 0.17.0 | No | experimental diff --git a/opentelemetry-contrib-instrumentations/pyproject.toml b/opentelemetry-contrib-instrumentations/pyproject.toml index 300895c1e0..b34226b669 100644 --- a/opentelemetry-contrib-instrumentations/pyproject.toml +++ b/opentelemetry-contrib-instrumentations/pyproject.toml @@ -71,6 +71,7 @@ dependencies = [ "opentelemetry-instrumentation-sqlite3==0.49b0.dev", "opentelemetry-instrumentation-starlette==0.49b0.dev", "opentelemetry-instrumentation-system-metrics==0.49b0.dev", + "opentelemetry-instrumentation-test==1.0.0b.dev", "opentelemetry-instrumentation-threading==0.49b0.dev", "opentelemetry-instrumentation-tornado==0.49b0.dev", "opentelemetry-instrumentation-tortoiseorm==0.49b0.dev", diff --git a/opentelemetry-instrumentation/src/opentelemetry/instrumentation/bootstrap_gen.py b/opentelemetry-instrumentation/src/opentelemetry/instrumentation/bootstrap_gen.py index cc9af1de80..ff6065d058 100644 --- a/opentelemetry-instrumentation/src/opentelemetry/instrumentation/bootstrap_gen.py +++ b/opentelemetry-instrumentation/src/opentelemetry/instrumentation/bootstrap_gen.py @@ -194,6 +194,7 @@ "opentelemetry-instrumentation-dbapi==0.49b0.dev", "opentelemetry-instrumentation-logging==0.49b0.dev", "opentelemetry-instrumentation-sqlite3==0.49b0.dev", + "opentelemetry-instrumentation-test==1.0.0b.dev", "opentelemetry-instrumentation-threading==0.49b0.dev", "opentelemetry-instrumentation-urllib==0.49b0.dev", "opentelemetry-instrumentation-wsgi==0.49b0.dev",