Skip to content

Commit ee20ca8

Browse files
authored
Merge branch 'main' into spi-final
2 parents e233884 + d471c70 commit ee20ca8

20 files changed

+216
-97
lines changed

.github/actions/image_scan/action.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,11 @@ inputs:
1111
severity:
1212
required: true
1313
description: "List of severities that will cause a failure"
14+
logout:
15+
required: true
16+
description: |
17+
Whether to logout of public AWS ECR. Set to 'true' for PR workflows to avoid potential call failures,
18+
'false' for daily scans which has a higher bar for passing regularly and specifically wants to sign in.
1419
1520
runs:
1621
using: "composite"
@@ -22,6 +27,7 @@ runs:
2227
# ensure we can make unauthenticated call. This is important for making the pr_build workflow run on
2328
# PRs created from forked repos.
2429
- name: Logout of public AWS ECR
30+
if: inputs.logout == 'true'
2531
shell: bash
2632
run: docker logout public.ecr.aws
2733

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

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ jobs:
3131
role-to-assume: arn:aws:iam::${{ secrets.APPLICATION_SIGNALS_E2E_TEST_ACCOUNT_ID }}:role/${{ secrets.APPLICATION_SIGNALS_E2E_TEST_ROLE_NAME }}
3232
aws-region: us-east-1
3333

34-
- uses: actions/download-artifact@v4
34+
- uses: actions/download-artifact@v5
3535
with:
3636
name: aws-opentelemetry-agent.jar
3737

@@ -245,3 +245,19 @@ jobs:
245245
with:
246246
aws-region: us-east-1
247247
caller-workflow-name: 'main-build'
248+
249+
# This validation is to ensure that all test workflows relevant to this repo are actually
250+
# being used in this repo, which is referring to all the other jobs in this file.
251+
#
252+
# If this starts failing, then it most likely means that new e2e test workflow was
253+
# added to `aws-observability/aws-application-signals-test-framework`, but was not
254+
# added to this file. It could also mean that a test in this file has been removed.
255+
#
256+
# If a particular test file is intended to not be tested in this repo and should not
257+
# be failing this particular validation, then choose one of the following options:
258+
# - Add the test file to the exclusions input (CSV format) to the workflow
259+
# (see: https://github.com/aws-observability/aws-application-signals-test-framework/blob/main/.github/workflows/validate-e2e-tests-are-accounted-for.yml#L1)
260+
# - Update the `validate-e2e-tests-are-accounted-for` job to change which "workflow files are expected to be used by this repo"
261+
# (see: https://github.com/aws-observability/aws-application-signals-test-framework/blob/main/.github/workflows/validate-e2e-tests-are-accounted-for.yml)
262+
validate-all-tests-are-accounted-for:
263+
uses: aws-observability/aws-application-signals-test-framework/.github/workflows/validate-e2e-tests-are-accounted-for.yml@main

.github/workflows/codeql-analysis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ jobs:
2323

2424
steps:
2525
- name: Checkout repository
26-
uses: actions/checkout@v4
26+
uses: actions/checkout@v5
2727

2828
# Initializes the CodeQL tools for scanning.
2929
- name: Initialize CodeQL

.github/workflows/docker-build-corretto-slim.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
build-corretto:
2020
runs-on: ubuntu-latest
2121
steps:
22-
- uses: actions/checkout@v4
22+
- uses: actions/checkout@v5
2323
- uses: gradle/wrapper-validation-action@v1
2424
- name: Configure AWS Credentials
2525
uses: aws-actions/configure-aws-credentials@v4
@@ -36,7 +36,7 @@ jobs:
3636
- name: Set up Docker Buildx
3737
uses: docker/setup-buildx-action@v3
3838
- name: Build docker image
39-
uses: docker/build-push-action@v5
39+
uses: docker/build-push-action@v6
4040
with:
4141
push: true
4242
context: scripts/docker/corretto-slim

.github/workflows/docker-build-smoke-tests-fake-backend.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020
build-docker:
2121
runs-on: ubuntu-latest
2222
steps:
23-
- uses: actions/checkout@v4
23+
- uses: actions/checkout@v5
2424
- uses: actions/setup-java@v4
2525
with:
2626
java-version: 17

.github/workflows/e2e-tests-app-with-java-agent.yml

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ jobs:
2525
runs-on: ubuntu-latest
2626
steps:
2727
- name: Checkout Java Instrumentation repository
28-
uses: actions/checkout@v4
28+
uses: actions/checkout@v5
2929
with:
3030
fetch-depth: 0
3131

@@ -71,15 +71,15 @@ jobs:
7171
env:
7272
COMMIT_HASH: ${{ inputs.image_tag }}
7373

74-
- uses: codecov/codecov-action@v3
74+
- uses: codecov/codecov-action@v5
7575

7676
test_Spring_App_With_Java_Agent:
7777
name: Test Spring App with AWS OTel Java agent
7878
needs: [ build_Images_For_Testing_Sample_App_With_Java_Agent ]
7979
runs-on: ubuntu-latest
8080

8181
steps:
82-
- uses: actions/checkout@v4
82+
- uses: actions/checkout@v5
8383

8484
- uses: actions/setup-java@v4
8585
with:
@@ -110,7 +110,7 @@ jobs:
110110
runs-on: ubuntu-latest
111111

112112
steps:
113-
- uses: actions/checkout@v4
113+
- uses: actions/checkout@v5
114114

115115
- uses: actions/setup-java@v4
116116
with:
@@ -141,7 +141,7 @@ jobs:
141141
runs-on: ubuntu-latest
142142

143143
steps:
144-
- uses: actions/checkout@v4
144+
- uses: actions/checkout@v5
145145

146146
- uses: actions/setup-java@v4
147147
with:
@@ -167,18 +167,18 @@ jobs:
167167
VALIDATOR_COMMAND: -c spark-otel-trace-metric-validation.yml --endpoint http://app:4567 --metric-namespace aws-otel-integ-test -t ${{ github.run_id }}-${{ github.run_number }}
168168

169169
# publish status
170-
publish-build-status:
171-
needs: [ test_Spring_App_With_Java_Agent, test_Spark_App_With_Java_Agent, test_Spark_AWS_SDK_V1_App_With_Java_Agent ]
172-
if: ${{ always() }}
173-
uses: ./.github/workflows/publish-status.yml
174-
with:
175-
namespace: 'ADOT/GitHubActions'
176-
repository: ${{ github.repository }}
177-
branch: ${{ github.ref_name }}
178-
workflow: ${{ inputs.caller-workflow-name }}
179-
success: ${{ needs.test_Spring_App_With_Java_Agent.result == 'success' &&
180-
needs.test_Spark_App_With_Java_Agent.result == 'success' &&
181-
needs.test_Spark_AWS_SDK_V1_App_With_Java_Agent.result == 'success' }}
182-
region: us-east-1
183-
secrets:
184-
roleArn: ${{ secrets.METRICS_ROLE_ARN }}
170+
# publish-build-status:
171+
# needs: [ test_Spring_App_With_Java_Agent, test_Spark_App_With_Java_Agent, test_Spark_AWS_SDK_V1_App_With_Java_Agent ]
172+
# if: ${{ always() }}
173+
# uses: ./.github/workflows/publish-status.yml
174+
# with:
175+
# namespace: 'ADOT/GitHubActions'
176+
# repository: ${{ github.repository }}
177+
# branch: ${{ github.ref_name }}
178+
# workflow: ${{ inputs.caller-workflow-name }}
179+
# success: ${{ needs.test_Spring_App_With_Java_Agent.result == 'success' &&
180+
# needs.test_Spark_App_With_Java_Agent.result == 'success' &&
181+
# needs.test_Spark_AWS_SDK_V1_App_With_Java_Agent.result == 'success' }}
182+
# region: us-east-1
183+
# secrets:
184+
# roleArn: ${{ secrets.METRICS_ROLE_ARN }}

.github/workflows/e2e-tests-with-operator.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ jobs:
3434
build-sample-app:
3535
runs-on: ubuntu-latest
3636
steps:
37-
- uses: actions/checkout@v4
37+
- uses: actions/checkout@v5
3838
with:
3939
fetch-depth: 0
4040

@@ -84,14 +84,14 @@ jobs:
8484
test-case-batch-value: ${{ steps.set-batches.outputs.batch-values }}
8585
steps:
8686
- name: Checkout Testing Framework repository
87-
uses: actions/checkout@v4
87+
uses: actions/checkout@v5
8888
with:
8989
repository: ${{ env.TESTING_FRAMEWORK_REPO }}
9090
path: testing-framework
9191
ref: ${{ inputs.test_ref }}
9292

9393
- name: Checkout Java Instrumentation repository
94-
uses: actions/checkout@v4
94+
uses: actions/checkout@v5
9595
with:
9696
fetch-depth: 0
9797
path: aws-otel-java-instrumentation
@@ -126,7 +126,7 @@ jobs:
126126
steps:
127127
# required for versioning
128128
- name: Checkout Java Instrumentation repository
129-
uses: actions/checkout@v4
129+
uses: actions/checkout@v5
130130
with:
131131
fetch-depth: 0
132132
path: aws-otel-java-instrumentation
@@ -151,7 +151,7 @@ jobs:
151151
role-duration-seconds: 14400
152152

153153
- name: Checkout Testing Framework repository
154-
uses: actions/checkout@v4
154+
uses: actions/checkout@v5
155155
with:
156156
repository: ${{ env.TESTING_FRAMEWORK_REPO }}
157157
path: testing-framework

.github/workflows/main-build.yml

Lines changed: 22 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jobs:
2222
name: Test patches applied to dependencies
2323
runs-on: aws-otel-java-instrumentation_ubuntu-latest_32-core
2424
steps:
25-
- uses: actions/checkout@v4
25+
- uses: actions/checkout@v5
2626
- uses: actions/setup-java@v4
2727
with:
2828
java-version: 17
@@ -54,7 +54,7 @@ jobs:
5454
staging_registry: ${{ steps.imageOutput.outputs.stagingRegistry }}
5555
staging_repository: ${{ steps.imageOutput.outputs.stagingRepository }}
5656
steps:
57-
- uses: actions/checkout@v4
57+
- uses: actions/checkout@v5
5858
with:
5959
fetch-depth: 0
6060
- uses: actions/setup-java@v4
@@ -189,7 +189,7 @@ jobs:
189189
runs-on: ubuntu-latest
190190
needs: build
191191
steps:
192-
- uses: actions/checkout@v4
192+
- uses: actions/checkout@v5
193193
with:
194194
fetch-depth: 0
195195
- uses: actions/setup-java@v4
@@ -229,7 +229,7 @@ jobs:
229229
application-signals-lambda-layer-build:
230230
runs-on: ubuntu-latest
231231
steps:
232-
- uses: actions/checkout@v4
232+
- uses: actions/checkout@v5
233233
with:
234234
fetch-depth: 0
235235
- uses: actions/setup-java@v4
@@ -263,16 +263,21 @@ jobs:
263263
adot-image-name: ${{ needs.build.outputs.staging-image }}
264264

265265
publish-build-status:
266-
needs: [ build, contract-tests ]
267-
if: ${{ always() }}
268-
uses: ./.github/workflows/publish-status.yml
269-
with:
270-
namespace: 'ADOT/GitHubActions'
271-
repository: ${{ github.repository }}
272-
branch: ${{ github.ref_name }}
273-
workflow: main-build
274-
success: ${{ needs.build.result == 'success' &&
275-
needs.contract-tests.result == 'success' }}
276-
region: us-east-1
277-
secrets:
278-
roleArn: ${{ secrets.METRICS_ROLE_ARN }}
266+
name: "Publish Main Build Status"
267+
needs: [ build, e2e-test, contract-tests, application-signals-lambda-layer-build, application-signals-e2e-test ]
268+
runs-on: ubuntu-latest
269+
if: always()
270+
steps:
271+
- name: Configure AWS Credentials for emitting metrics
272+
uses: aws-actions/configure-aws-credentials@v4
273+
with:
274+
role-to-assume: ${{ secrets.METRICS_ROLE_ARN }}
275+
aws-region: us-east-1
276+
277+
- name: Publish main build status
278+
run: |
279+
value="${{ needs.build.result == 'success' && needs.e2e-test.result == 'success' && needs.contract-tests.result == 'success' && needs.application-signals-lambda-layer-build.result == 'success' && needs.application-signals-e2e-test.result == 'success' && '0.0' || '1.0' }}"
280+
aws cloudwatch put-metric-data --namespace 'ADOT/GitHubActions' \
281+
--metric-name Failure \
282+
--dimensions repository=${{ github.repository }},branch=${{ github.ref_name }},workflow=main_build \
283+
--value $value

.github/workflows/nightly-upstream-snapshot-build.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ jobs:
2323
image_name: ${{ steps.imageOutput.outputs.imageName }}
2424

2525
steps:
26-
- uses: actions/checkout@v4
26+
- uses: actions/checkout@v5
2727
with:
2828
fetch-depth: 0
2929

@@ -129,7 +129,7 @@ jobs:
129129
runs-on: ubuntu-latest
130130
needs: build
131131
steps:
132-
- uses: actions/checkout@v4
132+
- uses: actions/checkout@v5
133133
with:
134134
fetch-depth: 0
135135
- uses: actions/setup-java@v4

.github/workflows/owasp.yml

Lines changed: 23 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,10 @@
88
name: Daily scan
99

1010
on:
11-
schedule:
12-
- cron: '0 18 * * *' # scheduled to run at 18:00 UTC every day
11+
schedule: # scheduled to run at 14:00, 20:00, 02:00 UTC every day
12+
- cron: '0 14 * * *' # 6:00/7:00 PST/PDT (14:00 UTC)
13+
- cron: '0 20 * * *' # 12:00/13:00 PST/PDT (20:00 UTC)
14+
- cron: '0 02 * * *' # 18:00/19:00 PST/PDT (02:00 UTC)
1315
workflow_dispatch: # be able to run the workflow on demand
1416

1517
env:
@@ -24,7 +26,7 @@ jobs:
2426
runs-on: ubuntu-latest
2527
steps:
2628
- name: Checkout repo for dependency scan
27-
uses: actions/checkout@v4
29+
uses: actions/checkout@v5
2830
with:
2931
fetch-depth: 0
3032

@@ -41,7 +43,7 @@ jobs:
4143
aws-region: ${{ env.AWS_DEFAULT_REGION }}
4244

4345
- name: Get NVD API key for dependency scan
44-
uses: aws-actions/aws-secretsmanager-get-secrets@v1
46+
uses: aws-actions/aws-secretsmanager-get-secrets@v2
4547
id: nvd_api_key
4648
with:
4749
secret-ids: ${{ secrets.NVD_API_KEY_SECRET_ARN }}
@@ -76,13 +78,25 @@ jobs:
7678
if: ${{ steps.dep_scan.outcome != 'success' }}
7779
run: less dependency-check-report.html
7880

81+
- name: Configure AWS credentials for image scan
82+
uses: aws-actions/configure-aws-credentials@v4
83+
with:
84+
role-to-assume: ${{ secrets.AWS_ASSUME_ROLE_ARN }}
85+
aws-region: ${{ env.AWS_DEFAULT_REGION }}
86+
87+
- name: Login to Public ECR
88+
uses: docker/login-action@v3
89+
with:
90+
registry: public.ecr.aws
91+
7992
- name: Perform high image scan on v1
8093
if: always()
8194
id: high_scan_v1
8295
uses: ./.github/actions/image_scan
8396
with:
8497
image-ref: "public.ecr.aws/aws-observability/adot-autoinstrumentation-java:v1.33.0"
8598
severity: 'CRITICAL,HIGH'
99+
logout: 'false'
86100

87101
- name: Perform low image scan on v1
88102
if: always()
@@ -91,22 +105,25 @@ jobs:
91105
with:
92106
image-ref: "public.ecr.aws/aws-observability/adot-autoinstrumentation-java:v1.33.0"
93107
severity: 'MEDIUM,LOW,UNKNOWN'
108+
logout: 'false'
94109

95110
- name: Perform high image scan on v2
96111
if: always()
97112
id: high_scan_v2
98113
uses: ./.github/actions/image_scan
99114
with:
100-
image-ref: "public.ecr.aws/aws-observability/adot-autoinstrumentation-java:v2.11.1"
115+
image-ref: "public.ecr.aws/aws-observability/adot-autoinstrumentation-java:v2.11.2"
101116
severity: 'CRITICAL,HIGH'
117+
logout: 'false'
102118

103119
- name: Perform low image scan on v2
104120
if: always()
105121
id: low_scan_v2
106122
uses: ./.github/actions/image_scan
107123
with:
108-
image-ref: "public.ecr.aws/aws-observability/adot-autoinstrumentation-java:v2.11.1"
124+
image-ref: "public.ecr.aws/aws-observability/adot-autoinstrumentation-java:v2.11.2"
109125
severity: 'MEDIUM,LOW,UNKNOWN'
126+
logout: 'false'
110127

111128
- name: Configure AWS Credentials for emitting metrics
112129
if: always()

0 commit comments

Comments
 (0)