Skip to content

Commit 21b9d68

Browse files
authored
Patch staging adot image for main build (#148)
*Issue #, if available:* Patch adot staging image for CW add-on for main build EKS E2E test, so that to test the latest adot image change. Match with Java main build E2E test: https://github.com/aws-observability/aws-otel-java-instrumentation/blob/9d719bfd3d62a92a0b2bcddf5fd95c76f0cd4c1e/.github/workflows/appsignals-e2e-eks-test.yml#L134 Test main build workflow run: https://github.com/aws-observability/aws-otel-python-instrumentation/actions/runs/8638079875 Test EKS canary workflow run: https://github.com/aws-observability/aws-otel-python-instrumentation/actions/runs/8639016525/job/23684554304 By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.
1 parent 28976d1 commit 21b9d68

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

.github/workflows/appsignals-python-e2e-eks-canary-test.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,4 @@ jobs:
3434
with:
3535
aws-region: ${{ matrix.aws-region }}
3636
test-cluster-name: 'e2e-python-canary-test'
37-
caller-workflow-name: 'appsignals-python-e2e-eks-canary-test'
38-
appsignals-adot-image: public.ecr.aws/aws-observability/adot-autoinstrumentation-python
39-
appsignals-adot-image-tag: v0.0.1
37+
caller-workflow-name: 'appsignals-python-e2e-eks-canary-test'

.github/workflows/appsignals-python-e2e-eks-test.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -179,6 +179,14 @@ jobs:
179179
${{ env.PYTHON_SAMPLE_APP_NAMESPACE }} && \
180180
aws eks update-kubeconfig --name ${{ inputs.test-cluster-name }} --region ${{ inputs.aws-region }}"
181181
182+
if [ "${{ inputs.caller-workflow-name }}" == "main-build" ]; then
183+
echo "Patching staging adot image for main build:"
184+
execute_and_retry 2 "kubectl patch deploy -namazon-cloudwatch amazon-cloudwatch-observability-controller-manager --type='json' \
185+
-p='[{"op": \"replace\", \"path\": \"/spec/template/spec/containers/0/args/0\", \"value\": \"--auto-instrumentation-python-image=${{ inputs.appsignals-adot-image }}:${{ inputs.appsignals-adot-image-tag }}\"}]'"
186+
execute_and_retry 2 "kubectl delete pods --all -n amazon-cloudwatch"
187+
execute_and_retry 2 "kubectl wait --for=condition=Ready pod --all -n amazon-cloudwatch"
188+
fi
189+
182190
execute_and_retry 2 "kubectl delete pods --all -n ${{ env.PYTHON_SAMPLE_APP_NAMESPACE }}"
183191
execute_and_retry 2 "kubectl wait --for=condition=Ready --request-timeout '5m' pod --all -n ${{ env.PYTHON_SAMPLE_APP_NAMESPACE }}"
184192

0 commit comments

Comments
 (0)