Skip to content

Commit 69f38ab

Browse files
authored
Merge branch 'main' into main
2 parents f1854ad + 2801ab2 commit 69f38ab

File tree

127 files changed

+1763
-1301
lines changed

Some content is hidden

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

127 files changed

+1763
-1301
lines changed

.github/workflows/pr-review.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: PR review
2+
# This workflow is triggered when a PR review is submitted. It checks if the review is approved and runs a script to add labels to the PR based on the review.
3+
on:
4+
pull_request_review:
5+
types:
6+
- submitted
7+
8+
permissions:
9+
contents: read
10+
11+
jobs:
12+
add-owner-approved-label:
13+
if: github.event.review.state == 'approved'
14+
runs-on: ubuntu-latest
15+
permissions:
16+
contents: read
17+
pull-requests: write
18+
steps:
19+
- name: Checkout
20+
uses: actions/checkout@v4
21+
22+
- name: Run add-labels-to-reviewed-pr.sh
23+
run: |
24+
chmod +x ./.github/workflows/scripts/add-labels-to-reviewed-pr.sh
25+
./.github/workflows/scripts/add-labels-to-reviewed-pr.sh
26+
env:
27+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
28+
REPO: ${{ github.repository }}
29+
PR: ${{ github.event.pull_request.number }}
Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
#!/usr/bin/env bash
2+
#
3+
# Copyright The OpenTelemetry Authors
4+
#
5+
# Licensed under the Apache License, Version 2.0 (the "License");
6+
# you may not use this file except in compliance with the License.
7+
# You may obtain a copy of the License at
8+
#
9+
# https://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing, software
12+
# distributed under the License is distributed on an "AS IS" BASIS,
13+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
# See the License for the specific language governing permissions and
15+
# limitations under the License.
16+
#
17+
# Adds a "has:owner-approval" label to a PR if a reviewer who approved it is a component owner.
18+
19+
set -euo pipefail
20+
21+
if [[ -z "${REPO:-}" || -z "${PR:-}" ]]; then
22+
echo "One or more of REPO and PR have not been set. Please ensure each is set."
23+
exit 0
24+
fi
25+
26+
main () {
27+
CUR_DIRECTORY=$(dirname "$0")
28+
29+
# The latestReviews key returns the latest review for each reviewer cutting out any other reviews.
30+
JSON=$(gh pr view "${PR}" --json "files,author,latestReviews" | tr -dc '[:print:]' | sed -E 's/\\[a-z]//g')
31+
FILES=$(echo -n "${JSON}"| jq -r '.files[].path')
32+
LATEST_REVIEWS=$(echo -n "${JSON}" | jq -c '.latestReviews')
33+
34+
# Fetch components
35+
COMPONENTS=$(bash "${CUR_DIRECTORY}/get-components.sh" | tac) # Reversed so we visit subdirectories first
36+
37+
declare -A PROCESSED_COMPONENTS
38+
39+
for COMPONENT in ${COMPONENTS}; do
40+
COMPONENT_OWNERS=$(COMPONENT="${COMPONENT}" bash "${CUR_DIRECTORY}/get-codeowners.sh")
41+
42+
for FILE in ${FILES}; do
43+
MATCH=$(echo -n "${FILE}" | grep -E "^${COMPONENT}" || true)
44+
45+
if [[ -z "${MATCH}" ]]; then
46+
continue
47+
fi
48+
49+
# If we match a file with a component, skip further processing for this file
50+
if [[ -v PROCESSED_COMPONENTS["${COMPONENT}"] ]]; then
51+
continue
52+
fi
53+
PROCESSED_COMPONENTS["${COMPONENT}"]=true
54+
55+
# Check if updated file is owned by one of the reviewers"
56+
echo "${LATEST_REVIEWS}" | jq -c '.[]' | while IFS= read -r REVIEW; do
57+
REVIEW_AUTHOR=$(echo -n "${REVIEW}"| jq -r '.author.login')
58+
REVIEW_STATE=$(echo -n "${REVIEW}"| jq -r '.state')
59+
if [[ "${REVIEW_STATE}" == "APPROVED" ]]; then
60+
# Review is approved. Checking if reviewer is a component owner
61+
for OWNER in ${COMPONENT_OWNERS}; do
62+
if [[ "${REVIEW_AUTHOR}" == "${OWNER}" ]]; then
63+
echo "Reviewer $REVIEW_AUTHOR is a component owner. Adding 'has:owner-approval' label."
64+
gh pr edit "${PR}" --repo "${REPO}" --add-label "has:owner-approval"
65+
exit 0
66+
fi
67+
done
68+
fi
69+
done
70+
done
71+
done
72+
}
73+
74+
# Ensure the script does not block a PR even if it fails
75+
main || echo "Failed to run $0"
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
#!/usr/bin/env bash
2+
#
3+
# Copyright The OpenTelemetry Authors
4+
#
5+
# Licensed under the Apache License, Version 2.0 (the "License");
6+
# you may not use this file except in compliance with the License.
7+
# You may obtain a copy of the License at
8+
#
9+
# https://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing, software
12+
# distributed under the License is distributed on an "AS IS" BASIS,
13+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
# See the License for the specific language governing permissions and
15+
# limitations under the License.
16+
#
17+
# Gets the owners for a given component from the component_owners.yml file.
18+
19+
# Define the file path
20+
YML_FILE=".github/component_owners.yml"
21+
22+
if [[ -z "${COMPONENT:-}" ]]; then
23+
echo "COMPONENT has not been set, please ensure it is set."
24+
exit 1
25+
fi
26+
27+
FOUND=0
28+
29+
# Parse the YAML file and extract owners for the given component
30+
while IFS= read -r line; do
31+
# Check if the line matches the given component
32+
if [[ "$line" =~ ^[[:space:]]*${COMPONENT}:[[:space:]]*$ ]]; then
33+
FOUND=1
34+
continue
35+
fi
36+
37+
# If the component is found, extract owners
38+
if [[ $FOUND -eq 1 ]]; then
39+
# Stop if we encounter another component or an empty line
40+
if [[ "$line" =~ ^[[:space:]]*[^#]+: || -z "$line" ]]; then
41+
break
42+
fi
43+
44+
# Extract the owner (remove leading spaces and '- ')
45+
if [[ "$line" =~ ^[[:space:]]*-[[:space:]]*[^#]+ ]]; then
46+
OWNER=$(echo "$line" | sed -E 's/^[[:space:]]*-[[:space:]]*([^#]+).*/\1/')
47+
echo "$OWNER"
48+
fi
49+
fi
50+
done < "$YML_FILE"
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
#!/usr/bin/env bash
2+
#
3+
# Copyright The OpenTelemetry Authors
4+
#
5+
# Licensed under the Apache License, Version 2.0 (the "License");
6+
# you may not use this file except in compliance with the License.
7+
# You may obtain a copy of the License at
8+
#
9+
# https://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing, software
12+
# distributed under the License is distributed on an "AS IS" BASIS,
13+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
# See the License for the specific language governing permissions and
15+
# limitations under the License.
16+
#
17+
# Gets the components from the component_owners.yml file.
18+
19+
20+
# Define the file path
21+
YML_FILE=".github/component_owners.yml"
22+
23+
# Parse the YAML file and extract components and their owners
24+
while IFS= read -r line; do
25+
# Check if the line contains a component (ends with ':')
26+
if [[ "$line" =~ ^[[:space:]]*[^#]+: ]]; then
27+
# Extract the component name (remove leading spaces and trailing ':')
28+
COMPONENT=$(echo "$line" | sed -E 's/^[[:space:]]*([^:]+):.*/\1/')
29+
echo "$COMPONENT"
30+
fi
31+
done < "$YML_FILE"

.release-please-manifest.json

Lines changed: 56 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -1,68 +1,68 @@
11
{
2-
"packages/resource-detector-alibaba-cloud": "0.31.9",
3-
"packages/resource-detector-aws": "2.6.0",
4-
"packages/resource-detector-azure": "0.14.0",
5-
"packages/resource-detector-container": "0.7.9",
6-
"packages/resource-detector-gcp": "0.41.0",
2+
"packages/resource-detector-alibaba-cloud": "0.31.10",
3+
"packages/resource-detector-aws": "2.7.0",
4+
"packages/resource-detector-azure": "0.15.0",
5+
"packages/resource-detector-container": "0.7.10",
6+
"packages/resource-detector-gcp": "0.42.0",
77
"packages/resource-detector-github": "0.31.2",
8-
"packages/resource-detector-instana": "0.25.0",
8+
"packages/resource-detector-instana": "0.26.0",
99
"packages/auto-configuration-propagators": "0.4.4",
10-
"packages/auto-instrumentations-node": "0.65.0",
11-
"packages/auto-instrumentations-web": "0.52.0",
10+
"packages/auto-instrumentations-node": "0.66.0",
11+
"packages/auto-instrumentations-web": "0.53.0",
1212
"packages/baggage-span-processor": "0.4.2",
13-
"packages/baggage-log-record-processor": "0.7.0",
13+
"packages/baggage-log-record-processor": "0.8.0",
1414
"packages/host-metrics": "0.36.2",
1515
"packages/id-generator-aws-xray": "2.0.3",
16-
"packages/propagation-utils": "0.31.9",
16+
"packages/propagation-utils": "0.31.10",
1717
"packages/redis-common": "0.38.2",
1818
"packages/sampler-aws-xray": "0.1.2",
1919
"packages/sql-common": "0.41.2",
20-
"packages/contrib-test-utils": "0.53.0",
21-
"packages/winston-transport": "0.17.0",
22-
"packages/instrumentation-amqplib": "0.53.0",
23-
"packages/instrumentation-cucumber": "0.22.0",
24-
"packages/instrumentation-dataloader": "0.24.0",
25-
"packages/instrumentation-fs": "0.26.0",
26-
"packages/instrumentation-kafkajs": "0.16.0",
27-
"packages/instrumentation-lru-memoizer": "0.51.0",
28-
"packages/instrumentation-mongoose": "0.53.0",
29-
"packages/instrumentation-runtime-node": "0.20.0",
30-
"packages/instrumentation-socket.io": "0.53.0",
31-
"packages/instrumentation-tedious": "0.25.0",
32-
"packages/instrumentation-typeorm": "0.7.0",
33-
"packages/instrumentation-undici": "0.17.0",
34-
"packages/instrumentation-aws-lambda": "0.58.0",
35-
"packages/instrumentation-aws-sdk": "0.62.0",
36-
"packages/instrumentation-bunyan": "0.52.0",
37-
"packages/instrumentation-cassandra-driver": "0.52.0",
38-
"packages/instrumentation-connect": "0.50.0",
39-
"packages/instrumentation-dns": "0.50.0",
40-
"packages/instrumentation-express": "0.55.0",
41-
"packages/instrumentation-fastify": "0.51.0",
42-
"packages/instrumentation-generic-pool": "0.50.0",
43-
"packages/instrumentation-graphql": "0.54.0",
44-
"packages/instrumentation-hapi": "0.53.0",
45-
"packages/instrumentation-ioredis": "0.54.0",
46-
"packages/instrumentation-knex": "0.51.0",
47-
"packages/instrumentation-koa": "0.55.0",
48-
"packages/instrumentation-memcached": "0.50.0",
49-
"packages/instrumentation-mongodb": "0.59.0",
50-
"packages/instrumentation-mysql": "0.52.0",
51-
"packages/instrumentation-mysql2": "0.53.0",
52-
"packages/instrumentation-nestjs-core": "0.53.0",
53-
"packages/instrumentation-net": "0.50.0",
54-
"packages/instrumentation-openai": "0.4.0",
55-
"packages/instrumentation-oracledb": "0.32.0",
56-
"packages/instrumentation-pg": "0.59.0",
57-
"packages/instrumentation-pino": "0.53.0",
58-
"packages/instrumentation-redis": "0.55.0",
59-
"packages/instrumentation-restify": "0.52.0",
60-
"packages/instrumentation-router": "0.51.0",
61-
"packages/instrumentation-winston": "0.51.0",
62-
"packages/instrumentation-document-load": "0.52.0",
63-
"packages/instrumentation-long-task": "0.51.0",
64-
"packages/instrumentation-user-interaction": "0.51.0",
65-
"packages/plugin-react-load": "0.38.0",
20+
"packages/contrib-test-utils": "0.54.0",
21+
"packages/winston-transport": "0.18.0",
22+
"packages/instrumentation-amqplib": "0.54.0",
23+
"packages/instrumentation-cucumber": "0.23.0",
24+
"packages/instrumentation-dataloader": "0.25.0",
25+
"packages/instrumentation-fs": "0.27.0",
26+
"packages/instrumentation-kafkajs": "0.17.0",
27+
"packages/instrumentation-lru-memoizer": "0.52.0",
28+
"packages/instrumentation-mongoose": "0.54.0",
29+
"packages/instrumentation-runtime-node": "0.21.0",
30+
"packages/instrumentation-socket.io": "0.54.0",
31+
"packages/instrumentation-tedious": "0.26.0",
32+
"packages/instrumentation-typeorm": "0.8.0",
33+
"packages/instrumentation-undici": "0.18.0",
34+
"packages/instrumentation-aws-lambda": "0.59.0",
35+
"packages/instrumentation-aws-sdk": "0.63.0",
36+
"packages/instrumentation-bunyan": "0.53.0",
37+
"packages/instrumentation-cassandra-driver": "0.53.0",
38+
"packages/instrumentation-connect": "0.51.0",
39+
"packages/instrumentation-dns": "0.51.0",
40+
"packages/instrumentation-express": "0.56.0",
41+
"packages/instrumentation-fastify": "0.52.0",
42+
"packages/instrumentation-generic-pool": "0.51.0",
43+
"packages/instrumentation-graphql": "0.55.0",
44+
"packages/instrumentation-hapi": "0.54.0",
45+
"packages/instrumentation-ioredis": "0.55.0",
46+
"packages/instrumentation-knex": "0.52.0",
47+
"packages/instrumentation-koa": "0.56.0",
48+
"packages/instrumentation-memcached": "0.51.0",
49+
"packages/instrumentation-mongodb": "0.60.0",
50+
"packages/instrumentation-mysql": "0.53.0",
51+
"packages/instrumentation-mysql2": "0.54.0",
52+
"packages/instrumentation-nestjs-core": "0.54.0",
53+
"packages/instrumentation-net": "0.51.0",
54+
"packages/instrumentation-openai": "0.5.0",
55+
"packages/instrumentation-oracledb": "0.33.0",
56+
"packages/instrumentation-pg": "0.60.0",
57+
"packages/instrumentation-pino": "0.54.0",
58+
"packages/instrumentation-redis": "0.56.0",
59+
"packages/instrumentation-restify": "0.53.0",
60+
"packages/instrumentation-router": "0.52.0",
61+
"packages/instrumentation-winston": "0.52.0",
62+
"packages/instrumentation-document-load": "0.53.0",
63+
"packages/instrumentation-long-task": "0.52.0",
64+
"packages/instrumentation-user-interaction": "0.52.0",
65+
"packages/plugin-react-load": "0.39.0",
6666
"packages/propagator-instana": "0.4.3",
6767
"packages/propagator-ot-trace": "0.28.3",
6868
"packages/propagator-aws-xray": "2.1.3",

0 commit comments

Comments
 (0)