Skip to content

Commit 1023443

Browse files
committed
Merge branch 'main' of github.com:open-telemetry/opentelemetry-java-contrib into code-stable-semconv
2 parents 228bbbf + 5ae1d57 commit 1023443

File tree

10 files changed

+85
-32
lines changed

10 files changed

+85
-32
lines changed
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# this file exists so that Renovate can auto-update docker image versions that are then used elsewhere
2+
3+
FROM lycheeverse/lychee:sha-2aa22f8@sha256:2e3786630482c41f9f2dd081e06d7da1c36d66996e8cf6573409b8bc418d48c4 AS lychee

.github/scripts/link-check.sh

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
#!/bin/bash
2+
3+
set -e
4+
5+
export MSYS_NO_PATHCONV=1 # for Git Bash on Windows
6+
7+
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
8+
LYCHEE_CONFIG="$SCRIPT_DIR/../../.lychee.toml"
9+
DEPENDENCIES_DOCKERFILE="$SCRIPT_DIR/dependencies.dockerfile"
10+
11+
# Extract lychee version from dependencies.dockerfile
12+
LYCHEE_VERSION=$(grep "FROM lycheeverse/lychee:" "$DEPENDENCIES_DOCKERFILE" | sed 's/.*FROM lycheeverse\/lychee:\([^ ]*\).*/\1/')
13+
14+
# Build the lychee command with optional GitHub token
15+
CMD="lycheeverse/lychee:$LYCHEE_VERSION --verbose --config $(basename "$LYCHEE_CONFIG")"
16+
17+
# Add GitHub token if available
18+
if [[ -n "$GITHUB_TOKEN" ]]; then
19+
CMD="$CMD --github-token $GITHUB_TOKEN"
20+
fi
21+
22+
# Add the target directory
23+
CMD="$CMD ."
24+
25+
# Determine if we should allocate a TTY
26+
DOCKER_FLAGS="--rm --init"
27+
if [[ -t 0 ]]; then
28+
DOCKER_FLAGS="$DOCKER_FLAGS -it"
29+
else
30+
DOCKER_FLAGS="$DOCKER_FLAGS -i"
31+
fi
32+
33+
# Run lychee with proper signal handling
34+
# shellcheck disable=SC2086
35+
exec docker run $DOCKER_FLAGS -v "$(dirname "$LYCHEE_CONFIG")":/data -w /data $CMD

.github/workflows/build.yml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -118,8 +118,12 @@ jobs:
118118
name: integration-test-results
119119
path: jmx-metrics/build/reports/tests/integrationTest
120120

121-
markdown-link-check:
122-
uses: ./.github/workflows/reusable-markdown-link-check.yml
121+
link-check:
122+
# release branches are excluded to avoid unnecessary maintenance if external links break
123+
# (and also because the README.md might need update on release branches before the release
124+
# download has been published)
125+
if: "!startsWith(github.ref_name, 'release/')"
126+
uses: ./.github/workflows/reusable-link-check.yml
123127

124128
markdown-lint-check:
125129
uses: ./.github/workflows/reusable-markdown-lint.yml
@@ -142,7 +146,7 @@ jobs:
142146
# and so would not short-circuit if used in the second-last position
143147
name: publish-snapshots${{ (github.ref_name != 'main' || github.repository != 'open-telemetry/opentelemetry-java-contrib') && ' (skipped)' || '' }}
144148
needs:
145-
# intentionally not blocking snapshot publishing on markdown-link-check or misspell-check
149+
# intentionally not blocking snapshot publishing on link-check or misspell-check
146150
- build
147151
- integration-test
148152
runs-on: ubuntu-latest

.github/workflows/codeql.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ jobs:
5050
uses: gradle/actions/setup-gradle@ac638b010cf58a27ee6c972d7336334ccaf61c96 # v4.4.1
5151

5252
- name: Initialize CodeQL
53-
uses: github/codeql-action/init@39edc492dbe16b1465b0cafca41432d857bdb31a # v3.29.1
53+
uses: github/codeql-action/init@181d5eefc20863364f96762470ba6f862bdef56b # v3.29.2
5454
with:
5555
languages: ${{ matrix.language }}
5656
# using "latest" helps to keep up with the latest Kotlin support
@@ -65,6 +65,6 @@ jobs:
6565
run: ./gradlew assemble --no-build-cache --no-daemon
6666

6767
- name: Perform CodeQL analysis
68-
uses: github/codeql-action/analyze@39edc492dbe16b1465b0cafca41432d857bdb31a # v3.29.1
68+
uses: github/codeql-action/analyze@181d5eefc20863364f96762470ba6f862bdef56b # v3.29.2
6969
with:
7070
category: "/language:${{matrix.language}}"

.github/workflows/ossf-scorecard.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,6 @@ jobs:
4242
# Upload the results to GitHub's code scanning dashboard (optional).
4343
# Commenting out will disable upload of results to your repo's Code Scanning dashboard
4444
- name: "Upload to code-scanning"
45-
uses: github/codeql-action/upload-sarif@39edc492dbe16b1465b0cafca41432d857bdb31a # v3.29.1
45+
uses: github/codeql-action/upload-sarif@181d5eefc20863364f96762470ba6f862bdef56b # v3.29.2
4646
with:
4747
sarif_file: results.sarif
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
name: Reusable - Link check
2+
3+
on:
4+
workflow_call:
5+
6+
permissions:
7+
contents: read
8+
9+
jobs:
10+
link-check:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
14+
15+
- name: Link check
16+
env:
17+
GITHUB_TOKEN: ${{ github.token }}
18+
run: ./.github/scripts/link-check.sh

.github/workflows/reusable-markdown-link-check.yml

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

.lychee.toml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
timeout = 30
2+
retry_wait_time = 5
3+
max_retries = 6
4+
max_concurrency = 4
5+
6+
# Check link anchors
7+
include_fragments = true
8+
9+
# excluding links to pull requests and issues is done for performance
10+
# sonatype snapshots are currrently unbrowseable
11+
exclude = [
12+
"^https://github.com/open-telemetry/opentelemetry-java-contrib/(issues|pull)/\\d+$",
13+
'^https://central.sonatype.com/service/rest/repository/browse/maven-snapshots/io/opentelemetry/contrib/$',
14+
]
15+
16+

aws-resources/src/main/java/io/opentelemetry/contrib/aws/resource/EcsResource.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -314,7 +314,7 @@ private static class DockerImage {
314314

315315
private static final Pattern imagePattern =
316316
Pattern.compile(
317-
"^(?<repository>([^/\\s]+/)?([^:\\s]+))(:(?<tag>[^@\\s]+))?(@sha256:(?<sha256>\\d+))?$");
317+
"^(?<repository>([^/\\s]+/)?([^:\\s]+))(:(?<tag>[^@\\s]+))?(@sha256:(?<sha256>[\\da-fA-F]+))?$");
318318

319319
final String repository;
320320
final String tag;

aws-resources/src/test/resources/ecs-container-metadata-v3.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"DockerId": "43481a6ce4842eec8fe72fc28500c6b52edcc0917f105b83379f88cac1ff3946",
33
"Name": "nginx-curl",
44
"DockerName": "ecs-nginx-5-nginx-curl-ccccb9f49db0dfe0d901",
5-
"Image": "nrdlngr/nginx-curl",
5+
"Image": "nrdlngr/nginx-curl:latest@sha256:8dc35e9386b5d280d285ae7a78d271a5d4a82106cb254fbed5fde4923faa8deb",
66
"ImageID": "sha256:2e00ae64383cfc865ba0a2ba37f61b50a120d2d9378559dcd458dc0de47bc165",
77
"Labels": {
88
"com.amazonaws.ecs.cluster": "default",
@@ -28,4 +28,4 @@
2828
]
2929
}
3030
]
31-
}
31+
}

0 commit comments

Comments
 (0)