Skip to content

Commit 6608e75

Browse files
authored
Merge branch 'main' into dependabot/npm_and_yarn/multi-16939dfd4d
2 parents 58540ce + ad9f772 commit 6608e75

File tree

20 files changed

+487
-133
lines changed

20 files changed

+487
-133
lines changed

.github/actions/artifacts_build/action.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ runs:
5252

5353
- name: Configure AWS Credentials
5454
if: ${{ inputs.push_image == true || inputs.push_image == 'true' }}
55-
uses: aws-actions/configure-aws-credentials@v4
55+
uses: aws-actions/configure-aws-credentials@a03048d87541d1d9fcf2ecf528a4a65ba9bd7838 #v5.0.0
5656
with:
5757
role-to-assume: ${{ inputs.snapshot-ecr-role }}
5858
aws-region: ${{ inputs.aws-region }}
@@ -67,14 +67,14 @@ runs:
6767
npm pack
6868
6969
- name: Set up QEMU
70-
uses: docker/setup-qemu-action@v3
70+
uses: docker/setup-qemu-action@29109295f81e9208d7d86ff1c6c12d2833863392 #3.6.0
7171

7272
- name: Set up Docker Buildx
73-
uses: docker/setup-buildx-action@v3
73+
uses: docker/setup-buildx-action@e468171a9de216ec08956ac3ada2f0791b6bd435 #v3.11.1
7474

7575
- name: Login to private AWS ECR
7676
if: ${{ inputs.push_image == true || inputs.push_image == 'true' }}
77-
uses: docker/login-action@v3
77+
uses: docker/login-action@184bdaa0721073962dff0199f1fb9940f07167d1 #v3.5.0
7878
with:
7979
registry: ${{ inputs.image_registry }}
8080
env:
@@ -90,7 +90,7 @@ runs:
9090
run: docker logout public.ecr.aws
9191

9292
- name: Build and push image according to input
93-
uses: docker/build-push-action@v5
93+
uses: docker/build-push-action@263435318d21b8e681c14492fe198d362a7d2c83 #v6.18.0
9494
with:
9595
push: ${{ inputs.push_image }}
9696
context: .

.github/actions/image_scan/action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ runs:
3232
run: docker logout public.ecr.aws
3333

3434
- name: Run Trivy vulnerability scanner on image
35-
uses: aquasecurity/trivy-action@master
35+
uses: aquasecurity/trivy-action@b6643a29fecd7f34b3597bc6acb0a98b03d33ff8 # v0.33.1
3636
with:
3737
image-ref: ${{ inputs.image-ref }}
3838
severity: ${{ inputs.severity }}

.github/actions/lambda_artifacts_build/action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ runs:
2424
using: 'composite'
2525
steps:
2626
- name: Download Tarball to GitHub Actions
27-
uses: actions/download-artifact@v4
27+
uses: actions/download-artifact@634f93cb2916e3fdff6788551b99b062d0335ce0 #v5.0.0
2828
with:
2929
name: ${{ inputs.staging_tarball}}
3030
path: ./aws-distro-opentelemetry-node-autoinstrumentation/

.github/actions/set_up/action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ runs:
2020
using: "composite"
2121
steps:
2222
- name: Set up node
23-
uses: actions/setup-node@v4
23+
uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 #v5.0.0
2424
with:
2525
node-version: ${{ inputs.node_version }}
2626
registry-url: 'https://registry.npmjs.org'

.github/workflows/application-signals-e2e-test.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,12 +29,12 @@ jobs:
2929
runs-on: ubuntu-latest
3030
steps:
3131
- name: Configure AWS Credentials
32-
uses: aws-actions/configure-aws-credentials@v4
32+
uses: aws-actions/configure-aws-credentials@a03048d87541d1d9fcf2ecf528a4a65ba9bd7838 #v5.0.0
3333
with:
3434
role-to-assume: arn:aws:iam::637423224110:role/${{ secrets.STAGING_ARTIFACTS_ACCESS_ROLE_NAME }}
3535
aws-region: us-east-1
3636

37-
- uses: actions/download-artifact@v4
37+
- uses: actions/download-artifact@634f93cb2916e3fdff6788551b99b062d0335ce0 #v5.0.0
3838
with:
3939
name: ${{ inputs.staging-instrumentation-name }}
4040

.github/workflows/codeql.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,11 +55,11 @@ jobs:
5555
# your codebase is analyzed, see https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/codeql-code-scanning-for-compiled-languages
5656
steps:
5757
- name: Checkout repository
58-
uses: actions/checkout@v4
58+
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 #v5.0.0
5959

6060
# Initializes the CodeQL tools for scanning.
6161
- name: Initialize CodeQL
62-
uses: github/codeql-action/init@v3
62+
uses: github/codeql-action/init@16df4fbc19aea13d921737861d6c622bf3cefe23 #v2.23.0
6363
with:
6464
languages: ${{ matrix.language }}
6565
build-mode: ${{ matrix.build-mode }}
@@ -87,6 +87,6 @@ jobs:
8787
exit 1
8888
8989
- name: Perform CodeQL Analysis
90-
uses: github/codeql-action/analyze@v3
90+
uses: github/codeql-action/analyze@16df4fbc19aea13d921737861d6c622bf3cefe23 #v2.23.0
9191
with:
9292
category: "/language:${{matrix.language}}"

.github/workflows/daily-scan.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -26,23 +26,23 @@ jobs:
2626
runs-on: ubuntu-latest
2727
steps:
2828
- name: Checkout repo for dependency scan
29-
uses: actions/checkout@v4
29+
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 #v5.0.0
3030
with:
3131
fetch-depth: 0
3232

3333
- name: Setup Node
34-
uses: actions/setup-node@v4
34+
uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 #v5.0.0
3535
with:
3636
node-version: "20"
3737

3838
- name: Configure AWS credentials for dependency scan
39-
uses: aws-actions/configure-aws-credentials@v4
39+
uses: aws-actions/configure-aws-credentials@a03048d87541d1d9fcf2ecf528a4a65ba9bd7838 #v5.0.0
4040
with:
4141
role-to-assume: ${{ secrets.AWS_ASSUME_ROLE_ARN }}
4242
aws-region: ${{ env.AWS_DEFAULT_REGION }}
4343

4444
- name: Get NVD API key for dependency scan
45-
uses: aws-actions/aws-secretsmanager-get-secrets@v1
45+
uses: aws-actions/aws-secretsmanager-get-secrets@a9a7eb4e2f2871d30dc5b892576fde60a2ecc802 #v2.0.10
4646
id: nvd_api_key
4747
with:
4848
secret-ids: ${{ secrets.NVD_API_KEY_SECRET_ARN }}
@@ -70,13 +70,13 @@ jobs:
7070
run: less dependency-check-report.html
7171

7272
- name: Configure AWS credentials for image scan
73-
uses: aws-actions/configure-aws-credentials@v4
73+
uses: aws-actions/configure-aws-credentials@a03048d87541d1d9fcf2ecf528a4a65ba9bd7838 #v5.0.0
7474
with:
7575
role-to-assume: ${{ secrets.AWS_ASSUME_ROLE_ARN }}
7676
aws-region: ${{ env.AWS_DEFAULT_REGION }}
7777

7878
- name: Login to Public ECR
79-
uses: docker/login-action@v3
79+
uses: docker/login-action@184bdaa0721073962dff0199f1fb9940f07167d1 #v3.5.0
8080
with:
8181
registry: public.ecr.aws
8282

@@ -100,7 +100,7 @@ jobs:
100100

101101
- name: Configure AWS Credentials for emitting metrics
102102
if: always()
103-
uses: aws-actions/configure-aws-credentials@v4
103+
uses: aws-actions/configure-aws-credentials@a03048d87541d1d9fcf2ecf528a4a65ba9bd7838 #v5.0.0
104104
with:
105105
role-to-assume: ${{ secrets.MONITORING_ROLE_ARN }}
106106
aws-region: ${{ env.AWS_DEFAULT_REGION }}

.github/workflows/main-build.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ jobs:
3333
staging_tarball_file: ${{ steps.staging_tarball_output.outputs.STAGING_TARBALL}}
3434
steps:
3535
- name: Checkout Contrib Repo @ SHA - ${{ github.sha }}
36-
uses: actions/checkout@v4
36+
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 #v5.0.0
3737

3838
- name: Get Node Distro Output
3939
id: node_output
@@ -73,7 +73,7 @@ jobs:
7373
aws s3 cp aws-distro-opentelemetry-node-autoinstrumentation/${{ steps.staging_tarball_output.outputs.STAGING_TARBALL }} s3://${{ env.STAGING_S3_BUCKET }}
7474
7575
- name: Upload Tarball to GitHub Actions
76-
uses: actions/upload-artifact@v4
76+
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 #v4.6.2
7777
with:
7878
name: ${{ steps.staging_tarball_output.outputs.STAGING_TARBALL}}
7979
path: aws-distro-opentelemetry-node-autoinstrumentation/${{ steps.staging_tarball_output.outputs.STAGING_TARBALL}}
@@ -112,7 +112,7 @@ jobs:
112112
if: always()
113113
steps:
114114
- name: Configure AWS Credentials for emitting metrics
115-
uses: aws-actions/configure-aws-credentials@v4
115+
uses: aws-actions/configure-aws-credentials@a03048d87541d1d9fcf2ecf528a4a65ba9bd7838 #v5.0.0
116116
with:
117117
role-to-assume: ${{ secrets.MONITORING_ROLE_ARN }}
118118
aws-region: ${{ env.AWS_DEFAULT_REGION }}

.github/workflows/post-release-version-bump.yml

Lines changed: 31 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@ on:
66
version:
77
description: 'Version number (e.g., 1.0.1)'
88
required: true
9+
is_patch:
10+
description: 'Is this a patch? (true or false)'
11+
required: true
12+
default: 'false'
913

1014
env:
1115
AWS_DEFAULT_REGION: us-east-1
@@ -20,7 +24,7 @@ jobs:
2024
runs-on: ubuntu-latest
2125
steps:
2226
- name: Checkout main
23-
uses: actions/checkout@v2
27+
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 #v5.0.0
2428
with:
2529
ref: main
2630
fetch-depth: 0
@@ -59,21 +63,21 @@ jobs:
5963
needs: check-version
6064
steps:
6165
- name: Configure AWS credentials for BOT secrets
62-
uses: aws-actions/configure-aws-credentials@v4
66+
uses: aws-actions/configure-aws-credentials@a03048d87541d1d9fcf2ecf528a4a65ba9bd7838 #v5.0.0
6367
with:
6468
role-to-assume: ${{ secrets.AWS_ROLE_ARN_SECRETS_MANAGER }}
6569
aws-region: ${{ env.AWS_DEFAULT_REGION }}
6670

6771
- name: Get Bot secrets
68-
uses: aws-actions/aws-secretsmanager-get-secrets@v1
72+
uses: aws-actions/aws-secretsmanager-get-secrets@a9a7eb4e2f2871d30dc5b892576fde60a2ecc802 #v2.0.10
6973
id: bot_secrets
7074
with:
7175
secret-ids: |
7276
BOT_TOKEN ,${{ secrets.BOT_TOKEN_SECRET_ARN }}
7377
parse-json-secrets: true
7478

7579
- name: Setup Git
76-
uses: actions/checkout@v2
80+
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 #v5.0.0
7781
with:
7882
fetch-depth: 0
7983
token: ${{ env.BOT_TOKEN_GITHUB_RW_PATOKEN }}
@@ -95,7 +99,7 @@ jobs:
9599
git checkout -b "prepare-main-for-next-dev-cycle-${VERSION}" origin/$RELEASE_BRANCH
96100
97101
- name: Set up node
98-
uses: actions/setup-node@v4
102+
uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 #v5.0.0
99103
with:
100104
node-version: 20
101105

@@ -109,6 +113,17 @@ jobs:
109113
VERSION="${{ github.event.inputs.version }}"
110114
npm install
111115
sed -i "s|\(/aws-observability/adot-autoinstrumentation-node:\)v[0-9]\+\.[0-9]\+\.[0-9]\+|\1v${{github.event.inputs.version}}|g" .github/workflows/daily-scan.yml
116+
117+
# for patch releases, avoid merge conflict by manually resolving CHANGELOG with main
118+
if [[ "${{ github.event.inputs.is_patch }}" == "true" ]]; then
119+
# Copy the patch release entries
120+
sed -n "/^## v${VERSION}/,/^## v[0-9]/p" CHANGELOG.md | sed '$d' > /tmp/patch_release_section.txt
121+
git fetch origin main
122+
git show origin/main:CHANGELOG.md > CHANGELOG.md
123+
# Insert the patch release entries after Unreleased
124+
awk -i inplace '/^## v[0-9]/ && !inserted { system("cat /tmp/patch_release_section.txt"); inserted=1 } {print}' CHANGELOG.md
125+
fi
126+
112127
git add .
113128
git status
114129
git commit -m "Prepare main for next development cycle: Update version to $DEV_VERSION"
@@ -126,4 +141,14 @@ jobs:
126141
127142
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice." \
128143
--head prepare-main-for-next-dev-cycle-${VERSION} \
129-
--base main
144+
--base main
145+
146+
- name: Force our CHANGELOG to override merge conflicts
147+
run: |
148+
git merge origin/main || true
149+
git checkout --ours CHANGELOG.md
150+
git add CHANGELOG.md
151+
if ! git diff --quiet --cached; then
152+
git commit -m "Force our CHANGELOG to override merge conflicts"
153+
git push origin "prepare-main-for-next-dev-cycle-${VERSION}"
154+
fi

.github/workflows/pr-build.yml

Lines changed: 48 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11
name: JavaScript Instrumentation PR Build
22
on:
33
pull_request:
4+
types:
5+
- opened
6+
- reopened
7+
- synchronize
8+
- labeled
9+
- unlabeled
410
branches:
511
- main
612
- "release/v*"
@@ -10,6 +16,42 @@ permissions:
1016
contents: read
1117

1218
jobs:
19+
changelog-check:
20+
runs-on: ubuntu-latest
21+
steps:
22+
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 #v5.0.0
23+
with:
24+
fetch-depth: 0
25+
26+
- name: Check CHANGELOG
27+
run: |
28+
# Check if PR is from workflows bot or dependabot
29+
if [[ "${{ github.event.pull_request.user.login }}" == "aws-application-signals-bot" ]]; then
30+
echo "Skipping check: PR from aws-application-signals-bot"
31+
exit 0
32+
fi
33+
34+
if [[ "${{ github.event.pull_request.user.login }}" == "dependabot[bot]" ]]; then
35+
echo "Skipping check: PR from dependabot"
36+
exit 0
37+
fi
38+
39+
# Check for skip changelog label
40+
if echo '${{ toJSON(github.event.pull_request.labels.*.name) }}' | jq -r '.[]' | grep -q "skip changelog"; then
41+
echo "Skipping check: skip changelog label found"
42+
exit 0
43+
fi
44+
45+
# Fetch base branch and check for CHANGELOG modifications
46+
git fetch origin ${{ github.base_ref }}
47+
if git diff --name-only origin/${{ github.base_ref }}..HEAD | grep -q "CHANGELOG.md"; then
48+
echo "CHANGELOG.md entry found - check passed"
49+
exit 0
50+
fi
51+
52+
echo "It looks like you didn't add an entry to CHANGELOG.md. If this change affects the SDK behavior, please update CHANGELOG.md and link this PR in your entry. If this PR does not need a CHANGELOG entry, you can add the 'Skip Changelog' label to this PR."
53+
exit 1
54+
1355
build:
1456
runs-on: ubuntu-latest
1557
strategy:
@@ -23,11 +65,11 @@ jobs:
2365
NPM_CONFIG_UNSAFE_PERM: true
2466
steps:
2567
- name: Checkout Repo @ SHA - ${{ github.sha }}
26-
uses: actions/checkout@v4
68+
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 #v5.0.0
2769
with:
2870
fetch-depth: 0
2971
- name: Setup Node
30-
uses: actions/setup-node@v4
72+
uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 #v5.0.0
3173
with:
3274
node-version: ${{ matrix.node }}
3375
- name: Update npm to a version that supports workspaces (v7 or later)
@@ -53,14 +95,14 @@ jobs:
5395
run: npm run test:coverage
5496
- name: Report Coverage
5597
if: ${{ matrix.code-coverage && !cancelled()}}
56-
uses: codecov/codecov-action@v4
98+
uses: codecov/codecov-action@5a1091511ad55cbe89839c7260b706298ca349f7 #v5.5.1
5799
with:
58100
verbose: true
59101

60102
contract-test:
61103
runs-on: ubuntu-latest
62104
steps:
63-
- uses: actions/checkout@v4
105+
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 #v5.0.0
64106
- name: run contract tests
65107
run: |
66108
bash ./scripts/build_and_install_distro.sh
@@ -71,8 +113,8 @@ jobs:
71113
lint:
72114
runs-on: ubuntu-latest
73115
steps:
74-
- uses: actions/checkout@v4
75-
- uses: actions/setup-node@v4
116+
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 #v5.0.0
117+
- uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 #v5.0.0
76118
with:
77119
node-version: 18
78120
cache: 'npm'

0 commit comments

Comments
 (0)