Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[release/v1.32.x] Add commits from main branch #761

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
60 commits
Select commit Hold shift + click to select a range
a5f5565
E2E Testing: Add failure in waiting for pods to retry mechanism (#659)
majanjua-amzn Dec 16, 2023
98c6d3d
Revert "E2E Testing: Add failure in waiting for pods to retry mechani…
bjrara Dec 16, 2023
7714afb
Bump github/codeql-action from 2 to 3
dependabot[bot] Dec 19, 2023
e48f3cf
Feat: add support to releasing to private ECR (#633)
rapphil Dec 20, 2023
6c223a3
Removing patch dependencies scope restriction to release branch only …
PaurushGarg Dec 21, 2023
d331e8e
Merging Release v1.32.x branch to main
PaurushGarg Dec 21, 2023
10a13cc
Updating patch file path and Excluding windows-built for patch build
PaurushGarg Dec 21, 2023
b5e7788
Merge pull request #671 from aws-observability/merge_release_v1.32.x_…
PaurushGarg Dec 27, 2023
dc55921
Add patch dependencies and publish to maven local (#677)
PaurushGarg Dec 27, 2023
491620b
nightly-build workfow update (#627)
PaurushGarg Dec 30, 2023
c982749
Adding missing symbols (#679)
PaurushGarg Dec 30, 2023
b6e0887
Fixing main build failure (#680)
PaurushGarg Dec 30, 2023
fdfb4ab
Updating workflows
PaurushGarg Jan 3, 2024
bb2796f
Merge pull request #689 from aws-observability/update-flows
rapphil Jan 5, 2024
0295b4a
Do not sign patched artifacts at PR time (#691)
bryan-aguilar Jan 6, 2024
f6ec5aa
Bump rust from 1.74 to 1.75
dependabot[bot] Jan 6, 2024
7d064d7
Bump tempfile from 3.8.1 to 3.9.0 in /tools/cp-utility
dependabot[bot] Jan 6, 2024
78f0f6f
Bump org.apache.logging.log4j:log4j-core from 2.20.0 to 2.22.1
dependabot[bot] Jan 6, 2024
401a09e
Bump com.linecorp.armeria:armeria-bom from 1.26.3 to 1.26.4
dependabot[bot] Jan 6, 2024
8a1a827
Bump org.mockito:mockito-junit-jupiter from 5.3.1 to 5.8.0
dependabot[bot] Jan 6, 2024
23448ba
Merge pull request #687 from aws-observability/dependabot/docker/rust…
rapphil Jan 8, 2024
fd73a99
Merge pull request #640 from aws-observability/dependabot/gradle/com.…
rapphil Jan 8, 2024
47047d2
Merge pull request #666 from aws-observability/dependabot/github_acti…
rapphil Jan 8, 2024
19528a9
Merge pull request #686 from aws-observability/dependabot/cargo/tools…
rapphil Jan 8, 2024
add2545
Merge pull request #682 from aws-observability/dependabot/gradle/org.…
rapphil Jan 8, 2024
8924b9c
Merge pull request #683 from aws-observability/dependabot/gradle/org.…
rapphil Jan 8, 2024
88fc9c4
Changing from workflow to action (#694)
PaurushGarg Jan 9, 2024
42a08de
Dry run validator before pull request (#690)
XinRanZhAWS Jan 9, 2024
a1722da
Handle multi-line strings (#700)
bryan-aguilar Jan 9, 2024
2f29ec1
Use input rather than secret (#702)
bryan-aguilar Jan 9, 2024
41f4c50
Fix usage of input variable in workflows (#703)
bryan-aguilar Jan 9, 2024
11a7f8a
Build patched artifacts in codeql workflow (#701)
bryan-aguilar Jan 9, 2024
59de65d
Set default region as build output (#704)
bryan-aguilar Jan 10, 2024
d760169
reorder init (#705)
bryan-aguilar Jan 10, 2024
6c850da
add outputs context (#706)
bryan-aguilar Jan 10, 2024
2c9c129
Reinsert aws default region env var (#708)
bryan-aguilar Jan 10, 2024
c465b5d
Build before publishing in e2e operator tests (#710)
bryan-aguilar Jan 10, 2024
8f8e556
Bump org.junit.jupiter:junit-jupiter-engine from 5.9.2 to 5.10.1 (#695)
dependabot[bot] Jan 10, 2024
559cf27
Bump actions/stale from 8 to 9 (#638)
dependabot[bot] Jan 10, 2024
3607a18
Bump com.google.guava:guava-bom from 32.1.3-jre to 33.0.0-jre (#696)
dependabot[bot] Jan 10, 2024
991fc0b
Bump org.apache.kafka:kafka-clients from 3.6.0 to 3.6.1 (#698)
dependabot[bot] Jan 10, 2024
00900ac
Bump actions/setup-java from 3 to 4 (#681)
dependabot[bot] Jan 10, 2024
0ffa2a7
Change terraform to use minimal ami (#712)
harrryr Jan 12, 2024
b907c0f
Add Documentation for Testing E2E Resource Changes (#709)
harrryr Jan 17, 2024
4be6798
Add E2E EC2 Release Testing for Main Build (#713)
harrryr Jan 18, 2024
c1a8428
Bump actions/setup-go from 4 to 5 (#639)
dependabot[bot] Jan 22, 2024
cf3c27a
Fix typos (#730)
thpierce Jan 29, 2024
fb25e6d
Update README.md (#743)
atshaw43 Feb 9, 2024
757e2ef
Remote target (#745)
atshaw43 Feb 13, 2024
61460af
Rename AppSignals configs with backward compatibility (#744)
srprash Feb 13, 2024
34a2f17
Updated generateRemoteService to parse HTTP_URL as last resort (#750)
AsakerMohd Feb 20, 2024
56c20f2
Support AppSignals metrics transport protocol configuration (#752)
wangzlei Feb 21, 2024
86c1bda
Parse db.statement attribute for database instrumentation (#755)
AsakerMohd Feb 21, 2024
7fdbf21
Bump gradle/gradle-build-action from 2 to 3 (#732)
dependabot[bot] Feb 22, 2024
6d41a16
prefix AWS.SDK to the RemoteService from v1 (#756)
srprash Feb 22, 2024
c352494
Update RemoteTarget Value to ::s3:::e2e-test-bucket-name for aws-sdk-…
harrryr Feb 23, 2024
50f1a20
update the remote target for eks e2e validations (#758)
srprash Feb 23, 2024
294e957
Add `RPC_SYSTEM` testing to AWS SDK contract tests (#760)
thpierce Feb 23, 2024
07c2727
Merge branch 'main' into release/v1.32.x
vasireddy99 Feb 23, 2024
298bce8
Merge branch 'main' into merge-maintorelese
vasireddy99 Feb 26, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
67 changes: 67 additions & 0 deletions .github/actions/cpUtility-testing/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
name: Build and Push Java-Agent Image after CPUtility Test
description: |
cpUtility Testing
This action assumes that Repo was checked out and Java was set correctly

inputs:
aws-region:
required: true
description: "AWS Region"
image_uri_with_tag:
required: true
description: "Image URI with Tag"
image_registry:
required: true
description: "Image Registry"
adot-java-version:
required: true
description: "ADOT Java Version"
snapshot-ecr-role:
require: true
description: "IAM Role used for pushing to snapshot ecr"


runs:
using: "composite"
steps:
- name: Set up QEMU
uses: docker/setup-qemu-action@v3

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v4
with:
role-to-assume: ${{ inputs.snapshot-ecr-role }}
aws-region: ${{ inputs.aws-region }}

- name: Login to private staging ecr
uses: docker/login-action@v3
with:
registry: ${{ inputs.image_registry }}
env:
AWS_REGION: ${{ inputs.aws-region }}

- name: Build image for testing
uses: docker/build-push-action@v5
with:
push: false
build-args: "ADOT_JAVA_VERSION=${{ inputs.adot-java-version }}"
context: .
platforms: linux/amd64
tags: ${{ inputs.image_uri_with_tag }}
load: true

- name: Test docker image
shell: bash
run: .github/scripts/test-adot-javaagent-image.sh "${{ inputs.image_uri_with_tag }}" "${{ inputs.adot-java-version }}"

- name: Build and push image
uses: docker/build-push-action@v5
with:
push: true
build-args: "ADOT_JAVA_VERSION=${{ inputs.adot-java-version }}"
context: .
platforms: linux/amd64,linux/arm64
tags: ${{ inputs.image_uri_with_tag }}
55 changes: 28 additions & 27 deletions .github/actions/patch-dependencies/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,33 +13,52 @@ inputs:
default: "false"
required: false
description: "If the workflow should run tests of the dependencies. Anything different than false will evaluate to true"
branch:
required: true
description: "The branch where this patches are being applied e.g.: release/v1.21.x"
gpg_private_key:
description: "The gpg key used to sign the artifacts"
required: true
required: false
gpg_password:
description: "The gpg key password"
required: true
required: false
runs:
using: "composite"
steps:
- name: set environment variables
env:
INPUT_KEY: ${{ inputs.gpg_private_key }}
INPUT_PASSWORD: ${{ inputs.gpg_password }}
shell: bash
run: |
EOF=$(dd if=/dev/urandom bs=15 count=1 status=none | base64)
if [[ ! -z "$INPUT_KEY" ]]; then
{
echo "GPG_PRIVATE_KEY<<$EOF"
echo "$INPUT_KEY"
echo "$EOF"
} >> "$GITHUB_ENV"
fi
if [[ ! -z "$INPUT_PASSWORD" ]]; then
{
echo "GPG_PASSWORD<<$EOF"
echo "$INPUT_PASSWORD"
echo "$EOF"
} >> "$GITHUB_ENV"
fi

- name: check patches
run: |
if [[ -f .github/patches/${{ inputs.branch }}/opentelemetry-java.patch ]]; then
if [[ -f .github/patches/opentelemetry-java.patch ]]; then
echo 'patch_otel_java=true' >> $GITHUB_ENV
fi
if [[ -f .github/patches/${{ inputs.branch }}/opentelemetry-java-instrumentation.patch ]]; then
if [[ -f .github/patches/opentelemetry-java-instrumentation.patch ]]; then
echo 'patch_otel_java_instrumentation=true' >> $GITHUB_ENV
fi
if [[ -f .github/patches/${{ inputs.branch }}/opentelemetry-java-contrib.patch ]]; then
if [[ -f .github/patches/opentelemetry-java-contrib.patch ]]; then
echo 'patch_otel_java_contrib=true' >> $GITHUB_ENV
fi
shell: bash

- name: Clone and patch repositories
run: .github/scripts/patch.sh "${{ inputs.branch }}"
run: .github/scripts/patch.sh
if: ${{ env.patch_otel_java == 'true' ||
env.patch_otel_java_instrumentation == 'true' ||
env.patch_otel_java_contrib == 'true' }}
Expand All @@ -51,19 +70,13 @@ runs:
with:
arguments: build publishToMavenLocal
build-root-directory: opentelemetry-java
env:
GPG_PRIVATE_KEY: ${{ inputs.gpg_private_key }}
GPG_PASSWORD: ${{ inputs.gpg_password }}

- name: Build opentelemetry-java
uses: gradle/gradle-build-action@v2
if: ${{ env.patch_otel_java == 'true' && inputs.run_tests == 'false' }}
with:
arguments: publishToMavenLocal
build-root-directory: opentelemetry-java
env:
GPG_PRIVATE_KEY: ${{ inputs.gpg_private_key }}
GPG_PASSWORD: ${{ inputs.gpg_password }}

- name: cleanup opentelemetry-java
run: rm -rf opentelemetry-java
Expand All @@ -76,19 +89,13 @@ runs:
with:
arguments: build publishToMavenLocal
build-root-directory: opentelemetry-java-contrib
env:
GPG_PRIVATE_KEY: ${{ inputs.gpg_private_key }}
GPG_PASSWORD: ${{ inputs.gpg_password }}

- name: Build opentelemetry-java-contrib
uses: gradle/gradle-build-action@v2
if: ${{ env.patch_otel_java_contrib == 'true' && inputs.run_tests == 'false' }}
with:
arguments: publishToMavenLocal
build-root-directory: opentelemetry-java-contrib
env:
GPG_PRIVATE_KEY: ${{ inputs.gpg_private_key }}
GPG_PASSWORD: ${{ inputs.gpg_password }}

- name: cleanup opentelemetry-java-contrib
run: rm -rf opentelemetry-java-contrib
Expand All @@ -101,19 +108,13 @@ runs:
with:
arguments: check -x spotlessCheck publishToMavenLocal
build-root-directory: opentelemetry-java-instrumentation
env:
GPG_PRIVATE_KEY: ${{ inputs.gpg_private_key }}
GPG_PASSWORD: ${{ inputs.gpg_password }}

- name: Build opentelemetry java instrumentation
uses: gradle/gradle-build-action@v2
if: ${{ env.patch_otel_java_instrumentation == 'true' && inputs.run_tests == 'false' }}
with:
arguments: publishToMavenLocal
build-root-directory: opentelemetry-java-instrumentation
env:
GPG_PRIVATE_KEY: ${{ inputs.gpg_private_key }}
GPG_PASSWORD: ${{ inputs.gpg_password }}

- name: cleanup opentelmetry-java-instrumentation
run: rm -rf opentelemetry-java-instrumentation
Expand Down
15 changes: 6 additions & 9 deletions .github/scripts/patch.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,29 +2,26 @@
# Enable debug mode, fail on any command that fail in this script and fail on unset variables
set -x -e -u

# This parameter will help find the patches to be applied
BRANCH=$1

# .github/patches/$BRANCH/versions.sh should define all the versions of the dependencies that we are going to patch
# .github/patches/versions.sh should define all the versions of the dependencies that we are going to patch
# This is used so that we can properly clone the upstream repositories.
# This file should define the following variables:
# OTEL_JAVA_VERSION. Tag of the opentelemetry-java repository to use. E.g.: JAVA_OTEL_JAVA_VERSION=v1.21.0
# OTEL_JAVA_INSTRUMENTATION_VERSION. Tag of the opentelemetry-java-instrumentation repository to use, e.g.: OTEL_JAVA_INSTRUMENTATION_VERSION=v1.21.0
# OTEL_JAVA_CONTRIB_VERSION. Tag of the opentelemetry-java-contrib repository. E.g.: OTEL_JAVA_CONTRIB_VERSION=v1.21.0
# This script will fail if a variable that is supposed to exist is referenced.

if [[ ! -f .github/patches/${BRANCH}/versions ]]; then
if [[ ! -f .github/patches/versions ]]; then
echo "No versions file found. Skipping patching"
exit 0
fi

source .github/patches/${BRANCH}/versions
source .github/patches/versions

git config --global user.email "adot-patch-workflow@github.com"
git config --global user.name "ADOT Patch workflow"


OTEL_JAVA_PATCH=".github/patches/${BRANCH}/opentelemetry-java.patch"
OTEL_JAVA_PATCH=".github/patches/opentelemetry-java.patch"
if [[ -f "$OTEL_JAVA_PATCH" ]]; then
git clone https://github.com/open-telemetry/opentelemetry-java.git
cd opentelemetry-java
Expand All @@ -37,7 +34,7 @@ else
fi


OTEL_JAVA_CONTRIB_PATCH=".github/patches/${BRANCH}/opentelemetry-java-contrib.patch"
OTEL_JAVA_CONTRIB_PATCH=".github/patches/opentelemetry-java-contrib.patch"
if [[ -f "$OTEL_JAVA_CONTRIB_PATCH" ]]; then
git clone https://github.com/open-telemetry/opentelemetry-java-contrib.git
cd opentelemetry-java-contrib
Expand All @@ -50,7 +47,7 @@ else
fi


OTEL_JAVA_INSTRUMENTATION_PATCH=".github/patches/${BRANCH}/opentelemetry-java-instrumentation.patch"
OTEL_JAVA_INSTRUMENTATION_PATCH=".github/patches/opentelemetry-java-instrumentation.patch"
if [[ -f "$OTEL_JAVA_INSTRUMENTATION_PATCH" ]]; then
git clone https://github.com/open-telemetry/opentelemetry-java-instrumentation.git
cd opentelemetry-java-instrumentation
Expand Down
58 changes: 48 additions & 10 deletions .github/workflows/appsignals-e2e-ec2-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,12 @@ permissions:
contents: read

env:
AWS_DEFAULT_REGION: ${{ inputs.aws-region }} # Used by terraform and AWS CLI commands
# The precense of this env var is required for use by terraform and AWS CLI commands
# It is not redundant
AWS_DEFAULT_REGION: ${{ inputs.aws-region }}
TEST_ACCOUNT: ${{ secrets.APP_SIGNALS_E2E_TEST_ACC }}
SAMPLE_APP_FRONTEND_SERVICE_JAR: "s3://aws-appsignals-sample-app/main-service.jar"
SAMPLE_APP_REMOTE_SERVICE_JAR: "s3://aws-appsignals-sample-app/remote-service.jar"
SAMPLE_APP_FRONTEND_SERVICE_JAR: ${{ secrets.APP_SIGNALS_E2E_FE_SA_JAR }}
SAMPLE_APP_REMOTE_SERVICE_JAR: ${{ secrets.APP_SIGNALS_E2E_RE_SA_JAR }}
APP_SIGNALS_ADOT_JAR: "https://github.com/aws-observability/aws-otel-java-instrumentation/releases/latest/download/aws-opentelemetry-agent.jar"
METRIC_NAMESPACE: AppSignals
LOG_GROUP_NAME: /aws/appsignals/generic
Expand All @@ -33,14 +35,18 @@ jobs:
with:
fetch-depth: 0

- uses: actions/setup-java@v4
with:
java-version: 17
distribution: temurin

- name: Set CW Agent RPM environment variable
run: |
if [ ${{ env.AWS_DEFAULT_REGION }} == "us-east-1" ]; then
echo APP_SIGNALS_CW_AGENT_RPM="https://amazoncloudwatch-agent-us-east-1.s3.amazonaws.com/amazon_linux/amd64/1.300031.0b313/amazon-cloudwatch-agent.rpm" >> $GITHUB_ENV
echo GET_CW_AGENT_RPM_COMMAND="wget -O cw-agent.rpm https://amazoncloudwatch-agent-us-east-1.s3.amazonaws.com/amazon_linux/amd64/1.300031.0b313/amazon-cloudwatch-agent.rpm" >> $GITHUB_ENV
else
echo APP_SIGNALS_CW_AGENT_RPM="https://amazoncloudwatch-agent-${{ env.AWS_DEFAULT_REGION }}.s3.${{ env.AWS_DEFAULT_REGION }}.amazonaws.com/amazon_linux/amd64/1.300031.0b313/amazon-cloudwatch-agent.rpm" >> $GITHUB_ENV
echo GET_CW_AGENT_RPM_COMMAND="wget -O cw-agent.rpm https://amazoncloudwatch-agent-${{ env.AWS_DEFAULT_REGION }}.s3.${{ env.AWS_DEFAULT_REGION }}.amazonaws.com/amazon_linux/amd64/1.300031.0b313/amazon-cloudwatch-agent.rpm" >> $GITHUB_ENV
fi


- name: Generate testing id
run: echo TESTING_ID="${{ github.run_id }}-${{ github.run_number }}" >> $GITHUB_ENV
Expand All @@ -51,6 +57,24 @@ jobs:
role-to-assume: ${{ secrets.E2E_TEST_ROLE_ARN }}
aws-region: ${{ env.AWS_DEFAULT_REGION }}

- uses: actions/download-artifact@v3
if: inputs.caller-workflow-name == 'main-build'
with:
name: aws-opentelemetry-agent.jar

- name: Upload main-build adot.jar to s3
if: inputs.caller-workflow-name == 'main-build'
run: aws s3 cp ./aws-opentelemetry-agent-*-SNAPSHOT.jar s3://main-build-adot-staging-jar/aws-opentelemetry-agent.jar

- name: Set Get ADOT.jar command environment variable
working-directory: testing/terraform/ec2
run: |
if [ ${{ inputs.caller-workflow-name }} == "main-build" ]; then
echo GET_ADOT_JAR_COMMAND="aws s3 cp s3://main-build-adot-staging-jar/aws-opentelemetry-agent.jar ./adot.jar" >> $GITHUB_ENV
else
echo GET_ADOT_JAR_COMMAND="wget -O adot.jar https://github.com/aws-observability/aws-otel-java-instrumentation/releases/latest/download/aws-opentelemetry-agent.jar" >> $GITHUB_ENV
fi

- name: Set up terraform
uses: hashicorp/setup-terraform@v3
with:
Expand All @@ -76,8 +100,8 @@ jobs:
-var="test_id=${{ env.TESTING_ID }}" \
-var="sample_app_jar=${{ env.SAMPLE_APP_FRONTEND_SERVICE_JAR }}" \
-var="sample_remote_app_jar=${{ env.SAMPLE_APP_REMOTE_SERVICE_JAR }}" \
-var="cw_agent_rpm=${{ env.APP_SIGNALS_CW_AGENT_RPM }}" \
-var="adot_jar=${{ env.APP_SIGNALS_ADOT_JAR }}" \
-var="get_cw_agent_rpm_command=${{ env.GET_CW_AGENT_RPM_COMMAND }}" \
-var="get_adot_jar_command=${{ env.GET_ADOT_JAR_COMMAND }}" \
|| deployment_failed=$?

if [ $deployment_failed -eq 1 ]; then
Expand Down Expand Up @@ -123,6 +147,22 @@ jobs:
fi
done

# cache local patch outputs
- name: Cache local Maven repository
id: cache-local-maven-repo
uses: actions/cache@v3
with:
path: |
~/.m2/repository/io/opentelemetry/
key: ${{ runner.os }}-maven-local-${{ hashFiles('.github/patches/opentelemetry-java*.patch') }}

- name: Publish patched dependencies to maven local
uses: ./.github/actions/patch-dependencies
if: steps.cache-local-maven-repo.outputs.cache-hit != 'true'
with:
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }}
gpg_password: ${{ secrets.GPG_PASSPHRASE }}

- name: Get the ec2 instance ami id
run: |
echo "EC2_INSTANCE_AMI=$(terraform output ec2_instance_ami)" >> $GITHUB_ENV
Expand Down Expand Up @@ -211,9 +251,7 @@ jobs:
--region ${{ env.AWS_DEFAULT_REGION }}
fi


# Clean up Procedures

- name: Terraform destroy
if: always()
continue-on-error: true
Expand Down
Loading
Loading