Skip to content

Commit 1029710

Browse files
jj22eethpierce
andauthored
Cherry-pick changes for v0.12.2 patch release (#506)
*Issue #, if available:* Cherry-picks: - #477 - #497 *Description of changes:* By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice. --------- Co-authored-by: Thomas Pierce <[email protected]>
1 parent 606f629 commit 1029710

File tree

16 files changed

+384
-64
lines changed

16 files changed

+384
-64
lines changed

.github/actions/artifacts_build/action.yml

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

5454
- name: Configure AWS Credentials
5555
if: ${{ inputs.push_image == true || inputs.push_image == 'true' }}
56-
uses: aws-actions/configure-aws-credentials@v4
56+
uses: aws-actions/configure-aws-credentials@a03048d87541d1d9fcf2ecf528a4a65ba9bd7838 #5.0.0
5757
with:
5858
role-to-assume: ${{ inputs.snapshot-ecr-role }}
5959
aws-region: ${{ inputs.aws-region }}
@@ -68,14 +68,14 @@ runs:
6868
python -m build --outdir ../dist
6969
7070
- name: Set up QEMU
71-
uses: docker/setup-qemu-action@v3
71+
uses: docker/setup-qemu-action@29109295f81e9208d7d86ff1c6c12d2833863392 #3.6.0
7272

7373
- name: Set up Docker Buildx
74-
uses: docker/setup-buildx-action@v3
74+
uses: docker/setup-buildx-action@e468171a9de216ec08956ac3ada2f0791b6bd435 #3.11.1
7575

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

9393
- name: Build and push image according to input
94-
uses: docker/build-push-action@v5
94+
uses: docker/build-push-action@263435318d21b8e681c14492fe198d362a7d2c83 #6.18.0
9595
with:
9696
push: ${{ inputs.push_image }}
9797
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/set_up/action.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ runs:
2121
using: "composite"
2222
steps:
2323
- name: Set up Python
24-
uses: actions/setup-python@v4
24+
uses: actions/setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c #v6.0.0
2525
with:
2626
python-version: ${{ inputs.python_version }}
2727

@@ -31,7 +31,7 @@ runs:
3131

3232
- name: Cache tox environment
3333
# Preserves .tox directory between runs for faster installs
34-
uses: actions/cache@v3
34+
uses: actions/cache@0400d5f644dc74513175e3cd8d07132dd4860809 #4.2.4
3535
with:
3636
path: |
3737
.tox

.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 #5.0.0
3333
with:
3434
role-to-assume: arn:aws:iam::${{ secrets.APPLICATION_SIGNALS_E2E_TEST_ACCOUNT_ID }}:role/${{ secrets.APPLICATION_SIGNALS_E2E_TEST_ROLE_NAME }}
3535
aws-region: us-east-1
3636

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

.github/workflows/codeql.yml

Lines changed: 38 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,11 +60,11 @@ jobs:
6060
# 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
6161
steps:
6262
- name: Checkout repository
63-
uses: actions/checkout@v4
63+
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 #5.0.0
6464

6565
# Initializes the CodeQL tools for scanning.
6666
- name: Initialize CodeQL
67-
uses: github/codeql-action/init@v3
67+
uses: github/codeql-action/init@16df4fbc19aea13d921737861d6c622bf3cefe23 #v2.23.0
6868
with:
6969
languages: ${{ matrix.language }}
7070
build-mode: ${{ matrix.build-mode }}
@@ -92,6 +92,41 @@ jobs:
9292
exit 1
9393
9494
- name: Perform CodeQL Analysis
95-
uses: github/codeql-action/analyze@v3
95+
uses: github/codeql-action/analyze@16df4fbc19aea13d921737861d6c622bf3cefe23 #v2.23.0
9696
with:
9797
category: "/language:${{matrix.language}}"
98+
99+
all-codeql-checks-pass:
100+
runs-on: ubuntu-latest
101+
needs: [analyze]
102+
if: always()
103+
steps:
104+
- name: Checkout to get workflow file
105+
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 #5.0.0
106+
107+
- name: Check all jobs succeeded and none missing
108+
run: |
109+
# Check if all needed jobs succeeded
110+
results='${{ toJSON(needs) }}'
111+
if echo "$results" | jq -r '.[] | .result' | grep -v success; then
112+
echo "Some jobs failed"
113+
exit 1
114+
fi
115+
116+
# Extract all job names from workflow (excluding this gate job)
117+
all_jobs=$(yq eval '.jobs | keys | .[]' .github/workflows/codeql.yml | grep -v "all-codeql-checks-pass" | sort)
118+
119+
# Extract job names from needs array
120+
needed_jobs='${{ toJSON(needs) }}'
121+
needs_list=$(echo "$needed_jobs" | jq -r 'keys[]' | sort)
122+
123+
# Check if any jobs are missing from needs
124+
missing_jobs=$(comm -23 <(echo "$all_jobs") <(echo "$needs_list"))
125+
if [ -n "$missing_jobs" ]; then
126+
echo "ERROR: Jobs missing from needs array in all-codeql-checks-pass:"
127+
echo "$missing_jobs"
128+
echo "Please add these jobs to the needs array of all-codeql-checks-pass"
129+
exit 1
130+
fi
131+
132+
echo "All CodeQL checks passed and no jobs missing from gate!"

.github/workflows/daily-scan.yml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,12 @@ 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 #5.0.0
3030
with:
3131
fetch-depth: 0
3232

3333
- name: Set up Python for dependency scan
34-
uses: actions/setup-python@v4
34+
uses: actions/setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c #v6.0.0
3535
with:
3636
python-version: "3.10"
3737

@@ -44,19 +44,19 @@ jobs:
4444
less aws-opentelemetry-distro/requirements.txt
4545
4646
- name: Install java for dependency scan
47-
uses: actions/setup-java@v4
47+
uses: actions/setup-java@dded0888837ed1f317902acf8a20df0ad188d165 #v5.0.0
4848
with:
4949
java-version: 17
5050
distribution: 'temurin'
5151

5252
- name: Configure AWS credentials for dependency scan
53-
uses: aws-actions/configure-aws-credentials@v4
53+
uses: aws-actions/configure-aws-credentials@a03048d87541d1d9fcf2ecf528a4a65ba9bd7838 #5.0.0
5454
with:
5555
role-to-assume: ${{ secrets.SECRET_MANAGER_ROLE_ARN }}
5656
aws-region: ${{ env.AWS_DEFAULT_REGION }}
5757

5858
- name: Get NVD API key for dependency scan
59-
uses: aws-actions/aws-secretsmanager-get-secrets@v1
59+
uses: aws-actions/aws-secretsmanager-get-secrets@a9a7eb4e2f2871d30dc5b892576fde60a2ecc802 #v2.0.10
6060
id: nvd_api_key
6161
with:
6262
secret-ids: ${{ secrets.NVD_API_KEY_SECRET_ARN }}
@@ -80,13 +80,13 @@ jobs:
8080
run: less dependency-check-report.html
8181

8282
- name: Configure AWS credentials for image scan
83-
uses: aws-actions/configure-aws-credentials@v4
83+
uses: aws-actions/configure-aws-credentials@a03048d87541d1d9fcf2ecf528a4a65ba9bd7838 #5.0.0
8484
with:
8585
role-to-assume: ${{ secrets.AWS_ASSUME_ROLE_ARN }}
8686
aws-region: ${{ env.AWS_DEFAULT_REGION }}
8787

8888
- name: Login to Public ECR
89-
uses: docker/login-action@v3
89+
uses: docker/login-action@184bdaa0721073962dff0199f1fb9940f07167d1 #v3.5.0
9090
with:
9191
registry: public.ecr.aws
9292

@@ -110,7 +110,7 @@ jobs:
110110

111111
- name: Configure AWS Credentials for emitting metrics
112112
if: always()
113-
uses: aws-actions/configure-aws-credentials@v4
113+
uses: aws-actions/configure-aws-credentials@a03048d87541d1d9fcf2ecf528a4a65ba9bd7838 #5.0.0
114114
with:
115115
role-to-assume: ${{ secrets.MONITORING_ROLE_ARN }}
116116
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_wheel_file: ${{ steps.staging_wheel_output.outputs.STAGING_WHEEL}}
3434
steps:
3535
- name: Checkout Repo @ SHA - ${{ github.sha }}
36-
uses: actions/checkout@v4
36+
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 #5.0.0
3737

3838
- name: Get Python Distro Output
3939
id: python_output
@@ -87,7 +87,7 @@ jobs:
8787
aws s3 cp dist/${{ steps.staging_wheel_output.outputs.STAGING_WHEEL}} s3://${{ env.STAGING_S3_BUCKET }}
8888
8989
- name: Upload Wheel to GitHub Actions
90-
uses: actions/upload-artifact@v4
90+
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 #v4.6.2
9191
with:
9292
name: ${{ steps.staging_wheel_output.outputs.STAGING_WHEEL}}
9393
path: dist/${{ steps.staging_wheel_output.outputs.STAGING_WHEEL}}
@@ -117,7 +117,7 @@ jobs:
117117
if: always()
118118
steps:
119119
- name: Configure AWS Credentials for emitting metrics
120-
uses: aws-actions/configure-aws-credentials@v4
120+
uses: aws-actions/configure-aws-credentials@a03048d87541d1d9fcf2ecf528a4a65ba9bd7838 #5.0.0
121121
with:
122122
role-to-assume: ${{ secrets.MONITORING_ROLE_ARN }}
123123
aws-region: ${{ env.AWS_DEFAULT_REGION }}

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020
runs-on: ubuntu-latest
2121
steps:
2222
- name: Checkout main
23-
uses: actions/checkout@v2
23+
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 #v5.0.0
2424
with:
2525
ref: main
2626
fetch-depth: 0
@@ -59,21 +59,21 @@ jobs:
5959
needs: check-version
6060
steps:
6161
- name: Configure AWS credentials for BOT secrets
62-
uses: aws-actions/configure-aws-credentials@v4
62+
uses: aws-actions/configure-aws-credentials@a03048d87541d1d9fcf2ecf528a4a65ba9bd7838 #v5.0.0
6363
with:
6464
role-to-assume: ${{ secrets.AWS_ROLE_ARN_SECRETS_MANAGER }}
6565
aws-region: ${{ env.AWS_DEFAULT_REGION }}
6666

6767
- name: Get Bot secrets
68-
uses: aws-actions/aws-secretsmanager-get-secrets@v1
68+
uses: aws-actions/aws-secretsmanager-get-secrets@a9a7eb4e2f2871d30dc5b892576fde60a2ecc802 #v2.0.10
6969
id: bot_secrets
7070
with:
7171
secret-ids: |
7272
BOT_TOKEN ,${{ secrets.BOT_TOKEN_SECRET_ARN }}
7373
parse-json-secrets: true
7474

7575
- name: Setup Git
76-
uses: actions/checkout@v2
76+
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 #v5.0.0
7777
with:
7878
fetch-depth: 0
7979
token: ${{ env.BOT_TOKEN_GITHUB_RW_PATOKEN }}

0 commit comments

Comments
 (0)