Skip to content

Commit

Permalink
Merge branch 'main' into windowsDotNetFix
Browse files Browse the repository at this point in the history
  • Loading branch information
AsakerMohd committed Dec 9, 2024
2 parents d6edbf8 + dc59ca4 commit b8c0bbd
Show file tree
Hide file tree
Showing 130 changed files with 3,002 additions and 311 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/dotnet-ec2-default-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ jobs:
echo GET_ADOT_DISTRO_COMMAND="aws s3 cp s3://adot-autoinstrumentation-dotnet-staging/${{ env.ADOT_DISTRO_NAME }} ./${{ env.ADOT_DISTRO_NAME }} && unzip -d dotnet-distro ${{ env.ADOT_DISTRO_NAME }}" >> $GITHUB_ENV
else
# After Release will switch to latest tag instead of hard code version for canary purpose
echo GET_ADOT_DISTRO_COMMAND="wget -O aws-distro-opentelemetry-dotnet-instrumentation-linux-glibc-x64.zip https://github.com/aws-observability/aws-otel-dotnet-instrumentation/releases/download/v1.3.2/aws-distro-opentelemetry-dotnet-instrumentation-linux-glibc-x64.zip && unzip -d dotnet-distro aws-distro-opentelemetry-dotnet-instrumentation-linux-glibc-x64.zip" >> $GITHUB_ENV
echo GET_ADOT_DISTRO_COMMAND="wget -O aws-distro-opentelemetry-dotnet-instrumentation-linux-glibc-x64.zip https://github.com/aws-observability/aws-otel-dotnet-instrumentation/releases/latest/download/aws-distro-opentelemetry-dotnet-instrumentation-linux-glibc-x64.zip && unzip -d dotnet-distro aws-distro-opentelemetry-dotnet-instrumentation-linux-glibc-x64.zip" >> $GITHUB_ENV
fi
- name: Set Get CW Agent command environment variable
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/dotnet-eks-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ jobs:
uses: ./.github/workflows/actions/execute_and_retry
with:
pre-command: "mkdir enablement-script && cd enablement-script"
command: "wget https://raw.githubusercontent.com/aws-observability/application-signals-demo/dotnet-sdk-1_3_2/scripts/eks/appsignals/enable-app-signals.sh
command: "wget https://raw.githubusercontent.com/aws-observability/application-signals-demo/main/scripts/eks/appsignals/enable-app-signals.sh
&& wget https://raw.githubusercontent.com/aws-observability/application-signals-demo/main/scripts/eks/appsignals/clean-app-signals.sh"
cleanup: "rm -f enable-app-signals.sh && rm -f clean-app-signals.sh"
post-command: "chmod +x enable-app-signals.sh && chmod +x clean-app-signals.sh"
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/java-ec2-default-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -112,8 +112,8 @@ jobs:
# Reusing the adot-main-build-staging-jar bucket to store the python wheel file
echo GET_ADOT_JAR_COMMAND="aws s3 cp s3://adot-main-build-staging-jar/aws-opentelemetry-agent.jar ./adot.jar" >> $GITHUB_ENV
elif [ "${{ env.OTEL_SOURCE }}" == "maven" ]; then
echo "Latest version for Maven is: 1.32.4"
echo GET_ADOT_JAR_COMMAND="wget -O adot.jar https://repo1.maven.org/maven2/software/amazon/opentelemetry/aws-opentelemetry-agent/1.32.4/aws-opentelemetry-agent-1.32.4.jar" >> $GITHUB_ENV
echo "Latest version for Maven is: 1.32.5"
echo GET_ADOT_JAR_COMMAND="wget -O adot.jar https://repo1.maven.org/maven2/software/amazon/opentelemetry/aws-opentelemetry-agent/1.32.5/aws-opentelemetry-agent-1.32.5.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
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/java-ecs-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -132,8 +132,7 @@ jobs:
if [ "${{ github.event.repository.name }}" = "amazon-cloudwatch-agent" ]; then
echo CWAGENT_IMAGE_URI="${{ secrets.AWS_ECR_PRIVATE_REGISTRY }}/cwagent-integration-test:${{ github.sha }}" >> $GITHUB_ENV
else
# echo CWAGENT_IMAGE_URI="public.ecr.aws/cloudwatch-agent/cloudwatch-agent:latest" >> $GITHUB_ENV
echo CWAGENT_IMAGE_URI="136146983976.dkr.ecr.us-east-1.amazonaws.com/cloudwatch-agent:1.300047.0b872" >> $GITHUB_ENV
echo CWAGENT_IMAGE_URI="public.ecr.aws/cloudwatch-agent/cloudwatch-agent:latest" >> $GITHUB_ENV
fi
- name: Deploy sample app via terraform and wait for the endpoint to come online
Expand Down
36 changes: 36 additions & 0 deletions .github/workflows/java-eks-otlp-ocb-canary.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
## Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
## SPDX-License-Identifier: Apache-2.0

## This workflow aims to run the Application Signals end-to-end tests as a canary to
## test the artifacts for App Signals enablement. It will deploy a sample app and remote
## service onto an EKS cluster, instrumented using an OTel Collector built through
## OTel Collector Builder (OCB) and interacting with the OTLP endpoint for this use case.
## Logs, metrics, and traces are all validated.
name: Java EKS OTLP/OCB Enablement Canary Test
on:
schedule:
- cron: '12,37 * * * *' # run the workflow at 12th and 37th minute of every hour
workflow_dispatch: # be able to run the workflow on demand

permissions:
id-token: write
contents: read

jobs:
eks:
strategy:
fail-fast: false
matrix:
aws-region: ['us-east-1']
# TODO: Reintroduce all regions
# aws-region: ['af-south-1','ap-east-1','ap-northeast-1','ap-northeast-2','ap-northeast-3','ap-south-1','ap-south-2','ap-southeast-1',
# 'ap-southeast-2','ap-southeast-3','ap-southeast-4','ca-central-1','eu-central-1','eu-central-2','eu-north-1',
# 'eu-south-1','eu-south-2','eu-west-1','eu-west-2','eu-west-3','il-central-1','me-central-1','me-south-1', 'sa-east-1',
# 'us-east-1','us-east-2','us-west-1','us-west-2']
uses: ./.github/workflows/java-eks-otlp-ocb-retry.yml
secrets: inherit
with:
aws-region: ${{ matrix.aws-region }}
test-cluster-name: 'e2e-java-otlp-ocb-canary-test'
caller-workflow-name: 'appsignals-java-e2e-eks-otlp-ocb-canary-test'
java-version: '11'
71 changes: 71 additions & 0 deletions .github/workflows/java-eks-otlp-ocb-retry.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
## Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
## SPDX-License-Identifier: Apache-2.0

# This is a reusable workflow for running the Enablement test for App Signals.
# It is meant to be called from another workflow.
# Read more about reusable workflows: https://docs.github.com/en/actions/using-workflows/reusing-workflows#overview
name: Java EKS OTLP/OCB Retry
on:
workflow_call:
inputs:
aws-region:
required: true
type: string
test-cluster-name:
required: true
type: string
caller-workflow-name:
required: true
type: string
java-version:
required: true
type: string

concurrency:
group: 'java-eks-otlp-ocb-${{ inputs.aws-region }}-${{ github.ref_name }}'
cancel-in-progress: false

permissions:
id-token: write
contents: read

jobs:
java-eks-otlp-ocb-attempt-1:
uses: ./.github/workflows/java-eks-otlp-ocb-test.yml
secrets: inherit
with:
aws-region: ${{ inputs.aws-region }}
test-cluster-name: ${{ inputs.test-cluster-name }}
caller-workflow-name: ${{ inputs.caller-workflow-name }}
java-version: ${{ inputs.java-version }}

java-eks-otlp-ocb-attempt-2:
needs: [ java-eks-otlp-ocb-attempt-1 ]
if: ${{ needs.java-eks-otlp-ocb-attempt-1.outputs.job-started != 'true' }}
uses: ./.github/workflows/java-eks-otlp-ocb-test.yml
secrets: inherit
with:
aws-region: ${{ inputs.aws-region }}
test-cluster-name: ${{ inputs.test-cluster-name }}
caller-workflow-name: ${{ inputs.caller-workflow-name }}
java-version: ${{ inputs.java-version }}

publish-metric-attempt-1:
needs: [ java-eks-otlp-ocb-attempt-1, java-eks-otlp-ocb-attempt-2 ]
if: always()
uses: ./.github/workflows/enablement-test-publish-result.yml
secrets: inherit
with:
aws-region: ${{ inputs.aws-region }}
caller-workflow-name: ${{ inputs.caller-workflow-name }}
validation-result: ${{ needs.java-eks-otlp-ocb-attempt-1.outputs.validation-result || needs.java-eks-otlp-ocb-attempt-2.outputs.validation-result }}

publish-metric-attempt-2:
needs: [ java-eks-otlp-ocb-attempt-1, java-eks-otlp-ocb-attempt-2, publish-metric-attempt-1 ]
if: ${{ always() && needs.publish-metric-attempt-1.outputs.job-started != 'true' }}
uses: ./.github/workflows/enablement-test-publish-result.yml
secrets: inherit
with:
aws-region: ${{ inputs.aws-region }}
caller-workflow-name: ${{ inputs.caller-workflow-name }}
validation-result: ${{ needs.java-eks-otlp-ocb-attempt-1.outputs.validation-result || needs.java-eks-otlp-ocb-attempt-2.outputs.validation-result }}
Loading

0 comments on commit b8c0bbd

Please sign in to comment.