Skip to content

Commit e3371aa

Browse files
committed
Merge branch 'main' into zhaez/release-build-safety
2 parents 2dfea63 + 74a1aa3 commit e3371aa

File tree

17 files changed

+99
-29
lines changed

17 files changed

+99
-29
lines changed

.github/actions/artifacts_build/action.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,4 +103,5 @@ runs:
103103
uses: ./.github/actions/image_scan
104104
with:
105105
image-ref: ${{ inputs.image_uri_with_tag }}
106-
severity: 'CRITICAL,HIGH,MEDIUM,LOW,UNKNOWN'
106+
severity: 'CRITICAL,HIGH,MEDIUM,LOW,UNKNOWN'
107+
logout: 'true'

.github/actions/image_scan/action.yml

Lines changed: 7 additions & 1 deletion
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

@@ -30,4 +36,4 @@ runs:
3036
with:
3137
image-ref: ${{ inputs.image-ref }}
3238
severity: ${{ inputs.severity }}
33-
exit-code: '1'
39+
exit-code: '1'

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

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,4 +124,20 @@ jobs:
124124
with:
125125
node-version: 22
126126
staging-instrumentation-name: ${{ inputs.staging-instrumentation-name }}
127-
caller-workflow-name: 'main-build'
127+
caller-workflow-name: 'main-build'
128+
129+
# This validation is to ensure that all test workflows relevant to this repo are actually
130+
# being used in this repo, which is referring to all the other jobs in this file.
131+
#
132+
# If this starts failing, then it most likely means that new e2e test workflow was
133+
# added to `aws-observability/aws-application-signals-test-framework`, but was not
134+
# added to this file. It could also mean that a test in this file has been removed.
135+
#
136+
# If a particular test file is intended to not be tested in this repo and should not
137+
# be failing this particular validation, then choose one of the following options:
138+
# - Add the test file to the exclusions input (CSV format) to the workflow
139+
# (see: https://github.com/aws-observability/aws-application-signals-test-framework/blob/main/.github/workflows/validate-e2e-tests-are-accounted-for.yml#L1)
140+
# - Update the `validate-e2e-tests-are-accounted-for` job to change which "workflow files are expected to be used by this repo"
141+
# (see: https://github.com/aws-observability/aws-application-signals-test-framework/blob/main/.github/workflows/validate-e2e-tests-are-accounted-for.yml)
142+
validate-all-tests-are-accounted-for:
143+
uses: aws-observability/aws-application-signals-test-framework/.github/workflows/validate-e2e-tests-are-accounted-for.yml@main

.github/workflows/daily-scan.yml

Lines changed: 19 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:
@@ -66,24 +68,35 @@ jobs:
6668
- name: Print dependency scan results on failure
6769
if: ${{ steps.dep_scan.outcome != 'success' }}
6870
run: less dependency-check-report.html
71+
72+
- name: Configure AWS credentials for image scan
73+
uses: aws-actions/configure-aws-credentials@v4
74+
with:
75+
role-to-assume: ${{ secrets.AWS_ASSUME_ROLE_ARN }}
76+
aws-region: ${{ env.AWS_DEFAULT_REGION }}
77+
78+
- name: Login to Public ECR
79+
uses: docker/login-action@v3
80+
with:
81+
registry: public.ecr.aws
6982

70-
# TODO: Update image to public once available
7183
- name: Perform high image scan
7284
if: always()
7385
id: high_scan
7486
uses: ./.github/actions/image_scan
7587
with:
76-
image-ref: "public.ecr.aws/aws-observability/adot-autoinstrumentation-node:v0.6.0"
88+
image-ref: "public.ecr.aws/aws-observability/adot-autoinstrumentation-node:v0.7.0"
7789
severity: 'CRITICAL,HIGH'
90+
logout: 'false'
7891

79-
# TODO: Update image to public once available
8092
- name: Perform low image scan
8193
if: always()
8294
id: low_scan
8395
uses: ./.github/actions/image_scan
8496
with:
85-
image-ref: "public.ecr.aws/aws-observability/adot-autoinstrumentation-node:v0.6.0"
97+
image-ref: "public.ecr.aws/aws-observability/adot-autoinstrumentation-node:v0.7.0"
8698
severity: 'MEDIUM,LOW,UNKNOWN'
99+
logout: 'false'
87100

88101
- name: Configure AWS Credentials for emitting metrics
89102
if: always()

.github/workflows/main-build.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,3 +104,23 @@ jobs:
104104
with:
105105
staging-instrumentation-name: ${{ needs.build.outputs.staging_tarball_file }}
106106
adot-image-name: ${{ needs.build.outputs.staging_registry }}/aws-observability/adot-autoinstrumentation-node-staging:${{ needs.build.outputs.node_image_tag }}
107+
108+
publish-main-build-status:
109+
name: "Publish Main Build Status"
110+
needs: [ build, application-signals-e2e-test ]
111+
runs-on: ubuntu-latest
112+
if: always()
113+
steps:
114+
- name: Configure AWS Credentials for emitting metrics
115+
uses: aws-actions/configure-aws-credentials@v4
116+
with:
117+
role-to-assume: ${{ secrets.MONITORING_ROLE_ARN }}
118+
aws-region: ${{ env.AWS_DEFAULT_REGION }}
119+
120+
- name: Publish main build status
121+
run: |
122+
value="${{ needs.build.result == 'success' && needs.application-signals-e2e-test.result == 'success' && '0.0' || '1.0'}}"
123+
aws cloudwatch put-metric-data --namespace 'ADOT/GitHubActions' \
124+
--metric-name Failure \
125+
--dimensions repository=${{ github.repository }},branch=${{ github.ref_name }},workflow=main_build \
126+
--value $value

.github/workflows/pr-build.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,15 @@ jobs:
3838
run: npm ci
3939
- name: Compile all NPM projects
4040
run: npm run compile
41+
- name: Build Tarball and Image Files
42+
uses: ./.github/actions/artifacts_build
43+
with:
44+
image_uri_with_tag: pr-build/${{ matrix.node }}
45+
push_image: false
46+
load_image: true
47+
node_version: ${{ matrix.node }}
48+
package_name: aws-distro-opentelemetry-node-autoinstrumentation
49+
os: ubuntu-latest
4150
- name: Build Lambda Layer
4251
run: npm run build-lambda
4352
- name: Unit tests (Full)

.github/workflows/release-lambda.yml

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@ on:
1313

1414
env:
1515
AWS_REGIONS: ${{ github.event.inputs.aws_region }}
16-
COMMERCIAL_REGIONS: us-east-1, us-east-2, us-west-1, us-west-2, ap-south-1, ap-northeast-3, ap-northeast-2, ap-southeast-1, ap-southeast-2, ap-northeast-1, ca-central-1, eu-central-1, eu-west-1, eu-west-2, eu-west-3, eu-north-1, sa-east-1, ap-southeast-5, ap-southeast-7, mx-central-1, ca-west-1, cn-north-1, cn-northwest-1
16+
# Legacy list of commercial regions to deploy to. New regions should NOT be added here, and instead should be added to the `aws_region` default input to the workflow.
17+
LEGACY_COMMERCIAL_REGIONS: us-east-1, us-east-2, us-west-1, us-west-2, ap-south-1, ap-northeast-3, ap-northeast-2, ap-southeast-1, ap-southeast-2, ap-northeast-1, ca-central-1, eu-central-1, eu-west-1, eu-west-2, eu-west-3, eu-north-1, sa-east-1
1718
LAYER_NAME: AWSOpenTelemetryDistroJs
1819

1920
permissions:
@@ -66,21 +67,21 @@ jobs:
6667
steps:
6768
- name: role arn
6869
env:
69-
COMMERCIAL_REGIONS: ${{ env.COMMERCIAL_REGIONS }}
70+
LEGACY_COMMERCIAL_REGIONS: ${{ env.LEGACY_COMMERCIAL_REGIONS }}
7071
run: |
71-
COMMERCIAL_REGIONS_ARRAY=(${COMMERCIAL_REGIONS//,/ })
72+
LEGACY_COMMERCIAL_REGIONS_ARRAY=(${LEGACY_COMMERCIAL_REGIONS//,/ })
7273
FOUND=false
73-
for REGION in "${COMMERCIAL_REGIONS_ARRAY[@]}"; do
74+
for REGION in "${LEGACY_COMMERCIAL_REGIONS_ARRAY[@]}"; do
7475
if [[ "$REGION" == "${{ matrix.aws_region }}" ]]; then
7576
FOUND=true
7677
break
7778
fi
7879
done
7980
if [ "$FOUND" = true ]; then
80-
echo "Found ${{ matrix.aws_region }} in COMMERCIAL_REGIONS"
81+
echo "Found ${{ matrix.aws_region }} in LEGACY_COMMERCIAL_REGIONS"
8182
SECRET_KEY="LAMBDA_LAYER_RELEASE"
8283
else
83-
echo "Not found ${{ matrix.aws_region }} in COMMERCIAL_REGIONS"
84+
echo "Not found ${{ matrix.aws_region }} in LEGACY_COMMERCIAL_REGIONS"
8485
SECRET_KEY="${{ matrix.aws_region }}_LAMBDA_LAYER_RELEASE"
8586
fi
8687
SECRET_KEY=${SECRET_KEY//-/_}

aws-distro-opentelemetry-node-autoinstrumentation/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@aws/aws-distro-opentelemetry-node-autoinstrumentation",
3-
"version": "0.6.0-dev0",
3+
"version": "0.7.0-dev0",
44
"description": "This package provides Amazon Web Services distribution of the OpenTelemetry Node Instrumentation, which allows for auto-instrumentation of NodeJS applications.",
55
"author": {
66
"name": "Amazon Web Services",

contract-tests/images/mock-collector/pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ dependencies = [
1313
"grpcio ~= 1.60.0",
1414
"opentelemetry-proto==1.25.0",
1515
"opentelemetry-sdk==1.25.0",
16-
"protobuf==4.25.2",
16+
"protobuf==4.25.8",
1717
"typing-extensions==4.9.0"
1818
]
1919

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
grpcio==1.60.1
22
opentelemetry-proto==1.25.0
33
opentelemetry-sdk==1.25.0
4-
protobuf==4.25.2
4+
protobuf==4.25.8
55
typing-extensions==4.9.0

0 commit comments

Comments
 (0)