Skip to content

Commit

Permalink
Merge branch 'main' into add_k8s_ns_phase
Browse files Browse the repository at this point in the history
  • Loading branch information
ChrsMark authored Jan 21, 2025
2 parents 21ccf66 + 0e109d2 commit 1421eb1
Show file tree
Hide file tree
Showing 11 changed files with 112 additions and 50 deletions.
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/bug_report.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: Bug report
description: Create a report to help us improve
labels: ["bug", "triage:needs-triage"]
labels: ["bug"]
body:
- type: markdown
attributes:
Expand Down
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/change_proposal.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: Propose changes to existing conventions
description: Propose changes you'd like to be added to existing conventions
labels: ["enhancement", "triage:needs-triage"]
labels: ["enhancement"]
body:
- type: dropdown
id: area
Expand Down
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/new-conventions.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: Propose new semantic conventions
description: Propose new conventions you'd like to be part of the OpenTelemetry project
labels: ["enhancement", "triage:needs-triage", "experts needed"]
labels: ["enhancement", "experts needed"]
body:
- type: markdown
attributes:
Expand Down
59 changes: 59 additions & 0 deletions .github/workflows/prepare-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
name: Prepare release
on:
workflow_dispatch:
inputs:
version:
description: 'The version to release, e.g. 1.30.0'
required: true

jobs:
create-pull-request:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Validate version
run: |
version=${{ inputs.version }}
if [[ ! "$version" =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
echo "unexpected version: $version"
exit 1
fi
- name: Use CLA approved github bot
run: .github/workflows/scripts/use-cla-approved-github-bot.sh

- name: Update schema files
run: |
if ! grep -q "^ next:$" schema-next.yaml; then
echo "String 'next:' not found in the file"
exit 1
fi
version=${{ inputs.version }}
sed -i "0,/^ next:$/s// $version:/" schema-next.yaml
cp schema-next.yaml "schemas/$version"
git add "schemas/$version"
sed -i "0,/^ $version:$/s// next:\n $version:/" schema-next.yaml
- name: Update change log
run: |
make chlog-update VERSION=v${{ inputs.version }}
- name: Create pull request
env:
# not using secrets.GITHUB_TOKEN since pull requests from that token do not run workflows
GH_TOKEN: ${{ secrets.OPENTELEMETRYBOT_GITHUB_TOKEN }}
run: |
version=${{ inputs.version }}
message="Prepare release v${version}"
body="Prepare release \`v${version}\`."
branch="opentelemetrybot/prepare-release-v${version}"
git checkout -b $branch
git commit -a -m "$message"
git push --set-upstream origin $branch
gh pr create --title "$message" \
--body "$body" \
--base main
29 changes: 11 additions & 18 deletions .github/workflows/scripts/prepare-new-issue.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ if [[ -z "${ISSUE:-}" || -z "${BODY:-}" || -z "${OPENER:-}" ]]; then
exit 0
fi

LABELS=""
LABELS="triage:needs-triage"
AREAS_SECTION_START=$( (echo "${BODY}" | grep -n '### Area(s)' | awk '{ print $1 }' | grep -oE '[0-9]+') || echo '-1' )
BODY_AREAS=""

Expand All @@ -45,26 +45,19 @@ for AREA in ${BODY_AREAS}; do
continue
fi

if [[ -n "${LABELS}" ]]; then
LABELS+=","
fi
LABELS+="${AREA}"
LABELS+=",${AREA}"
done

if [[ -v PINGED_AREAS[@] ]]; then
echo "The issue was associated with areas:" "${!PINGED_AREAS[@]}"
if [[ -v BODY_AREAS[@] ]]; then
echo "The issue was associated with areas:" "${!BODY_AREAS[@]}"
else
echo "No related areas were given"
fi

if [[ -n "${LABELS}" ]]; then
# Notes on this call:
# 1. Labels will be deduplicated by the GitHub CLI.
# 2. The call to edit the issue will fail if any of the
# labels doesn't exist. We can be reasonably sure that
# all labels will exist since they come from a known set.
echo "Adding the following labels: ${LABELS//,/ /}"
gh issue edit "${ISSUE}" --add-label "${LABELS}" || true
else
echo "No labels were found to add"
fi
# Notes on this call:
# 1. Labels will be deduplicated by the GitHub CLI.
# 2. The call to edit the issue will fail if any of the
# labels doesn't exist. We can be reasonably sure that
# all labels will exist since they come from a known set.
echo "Adding the following labels: ${LABELS//,/ /}"
gh issue edit "${ISSUE}" --add-label "${LABELS}" || true
4 changes: 4 additions & 0 deletions .github/workflows/scripts/use-cla-approved-github-bot.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/bash -e

git config user.name opentelemetrybot
git config user.email [email protected]
28 changes: 0 additions & 28 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ requirements and recommendations.
- [Update the tables of content](#update-the-tables-of-content)
- [Markdown link check](#markdown-link-check)
- [Updating the referenced specification version](#updating-the-referenced-specification-version)
- [Making a Release](#making-a-release)
- [Merging existing ECS conventions](#merging-existing-ecs-conventions)

<!-- tocstop -->
Expand Down Expand Up @@ -415,33 +414,6 @@ make markdown-link-check
4. Run the script from the root directory, e.g. `semantic-conventions$ ./internal/tools/update_specification_version.sh`.
5. Add all modified files to the change submit and submit a PR.

## Making a Release

- Ensure the referenced specification version is up to date. Use
[tooling to update the spec](#updating-the-referenced-specification-version)
if needed.
- Run [opentelemetry.io workflow](https://github.com/open-telemetry/opentelemetry.io/actions/workflows/build-dev.yml)
against `semantic-conventions` submodule as a smoke-test for docs. Fix broken links, if any.
- Create a staging branch for the release.
- Update `schema-next.yaml` file and move to `schemas/{version}`
- Ensure the `next` version is appropriately configured as the `{version}`.
- Copy `schema-next.yaml` to `schemas/{version}`.
- Add `next` as a version in `schema-next.yaml` version.
- Run `make chlog-update VERSION=v{version}`
- `make chlog-update` will clean up all the current `.yaml` files inside the
`.chloggen` folder automatically
- Double check that `CHANGELOG.md` is updated with the proper `v{version}`
- Send staging branch as PR for review.
- After the release PR is merged, create a [new release](https://github.com/open-telemetry/semantic-conventions/releases/new):
- Set title and tag to `v{version}`
- Set target to the commit of the merged release PR
- Copy changelog to the release notes
- Verify that the release looks like expected
- Publish release

New release is then auto-discovered by [opentelemetry.io](https://github.com/open-telemetry/opentelemetry.io) pipelines which (via bot-generated PR)
eventually results in new version of schema file being published.

## Merging existing ECS conventions

The Elastic Common Schema (ECS) is being merged into OpenTelemetry Semantic
Expand Down
26 changes: 26 additions & 0 deletions RELEASING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# Making a Release

- Ensure the referenced specification version is up to date. Use
[tooling to update the spec](./CONTRIBUTING.md#updating-the-referenced-specification-version)
if needed.
- Run [opentelemetry.io workflow](https://github.com/open-telemetry/opentelemetry.io/actions/workflows/build-dev.yml)
against `semantic-conventions` submodule as a smoke-test for docs. Fix broken links, if any.
- Create a staging branch for the release.
- Update `schema-next.yaml` file and move to `schemas/{version}`
- Ensure the `next` version is appropriately configured as the `{version}`.
- Copy `schema-next.yaml` to `schemas/{version}`.
- Add `next` as a version in `schema-next.yaml` version.
- Run `make chlog-update VERSION=v{version}`
- `make chlog-update` will clean up all the current `.yaml` files inside the
`.chloggen` folder automatically
- Double check that `CHANGELOG.md` is updated with the proper `v{version}`
- Send staging branch as PR for review.
- After the release PR is merged, create a [new release](https://github.com/open-telemetry/semantic-conventions/releases/new):
- Set title and tag to `v{version}`
- Set target to the commit of the merged release PR
- Copy changelog to the release notes
- Verify that the release looks like expected
- Publish release

New release is then auto-discovered by [opentelemetry.io](https://github.com/open-telemetry/opentelemetry.io) pipelines which (via bot-generated PR)
eventually results in new version of schema file being published.
2 changes: 1 addition & 1 deletion docs/general/recording-errors.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ When the operation ends with an error, instrumentation:
When the operation fails with an exception, the span status description SHOULD be set to
the exception message.

Refer to the [recording exceptions](#recording-errors) on capturing exception
Refer to the [recording exceptions](#recording-exceptions) on capturing exception
details.

## Recording errors on metrics
Expand Down
4 changes: 4 additions & 0 deletions docs/non-normative/db-migration.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@ updated to the stable database semantic conventions, they:
- May drop the environment variable in their next major version and emit only
the stable database conventions.

> [!NOTE]
> `OTEL_SEMCONV_STABILITY_OPT_IN` is only intended to be used when migrating
> from an experimental semantic convention to its initial stable version.
## Summary of changes

This section summarizes the changes made to the HTTP semantic conventions
Expand Down
4 changes: 4 additions & 0 deletions docs/non-normative/http-migration.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,10 @@ updated to the stable HTTP semantic conventions, they:
- May drop the environment variable in their next major version and emit only
the stable HTTP and networking conventions.

> [!NOTE]
> `OTEL_SEMCONV_STABILITY_OPT_IN` is only intended to be used when migrating
> from an experimental semantic convention to its initial stable version.
## Summary of changes

This section summarizes the changes made to the HTTP semantic conventions
Expand Down

0 comments on commit 1421eb1

Please sign in to comment.