Skip to content

Commit

Permalink
undo hardcoded region
Browse files Browse the repository at this point in the history
  • Loading branch information
jj22ee committed Nov 22, 2024
1 parent 77de498 commit a87ab45
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 12 deletions.
16 changes: 6 additions & 10 deletions .github/workflows/java-eks-otlp-ocb-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,9 @@ jobs:
- name: Install OTel Collector
uses: ./.github/workflows/actions/execute_and_retry
with:
command: "cd ${{ env.TEST_RESOURCES_FOLDER }}/terraform/java/eks-otlp-ocb/util && kubectl apply -f ./appsignals-collector.yaml -n ${{ env.SAMPLE_APP_NAMESPACE }}"
command: "cd ${{ env.TEST_RESOURCES_FOLDER }}/terraform/java/eks-otlp-ocb/util && \
sed -i 's/{E2E_TEST_AWS_REGION}/{{ env.E2E_TEST_AWS_REGION }}/g' ./appsignals-collector.yaml && \
kubectl apply -f ./appsignals-collector.yaml -n ${{ env.SAMPLE_APP_NAMESPACE }}"
cleanup: "kubectl delete -f ./appsignals-collector.yaml -n ${{ env.SAMPLE_APP_NAMESPACE }} && \
aws eks update-kubeconfig --name ${{ env.CLUSTER_NAME }} --region ${{ env.E2E_TEST_AWS_REGION }}"
max_retry: 3
Expand Down Expand Up @@ -271,7 +273,7 @@ jobs:
run: ./gradlew validator:run --args='-c java/eks-otlp-ocb/log-validation.yml
--testing-id ${{ env.TESTING_ID }}
--endpoint http://${{ env.APP_ENDPOINT }}
--region us-east-1
--region ${{ env.E2E_TEST_AWS_REGION }}
--account-id ${{ env.ACCOUNT_ID }}
--metric-namespace ${{ env.METRIC_NAMESPACE }}
--log-group ${{ env.LOG_GROUP_NAME }}
Expand All @@ -282,16 +284,14 @@ jobs:
--remote-service-ip ${{ env.REMOTE_SERVICE_POD_IP }}
--query-string ip=${{ env.REMOTE_SERVICE_POD_IP }}&testingId=${{ env.TESTING_ID }}
--rollup'
# TODO: Undo hardcode
# --region ${{ env.E2E_TEST_AWS_REGION }}

- name: Call endpoints and validate generated metrics
id: metric-validation
if: (steps.deploy-sample-app.outcome == 'success' || steps.log-validation.outcome == 'failure') && !cancelled()
run: ./gradlew validator:run --args='-c java/eks-otlp-ocb/metric-validation.yml
--testing-id ${{ env.TESTING_ID }}
--endpoint http://${{ env.APP_ENDPOINT }}
--region us-east-1
--region ${{ env.E2E_TEST_AWS_REGION }}
--account-id ${{ env.ACCOUNT_ID }}
--metric-namespace ${{ env.METRIC_NAMESPACE }}
--log-group ${{ env.LOG_GROUP_NAME }}
Expand All @@ -303,16 +303,14 @@ jobs:
--remote-service-ip ${{ env.REMOTE_SERVICE_POD_IP }}
--query-string ip=${{ env.REMOTE_SERVICE_POD_IP }}&testingId=${{ env.TESTING_ID }}
--rollup'
# TODO: Undo hardcodes:
# --region ${{ env.E2E_TEST_AWS_REGION }}

- name: Call endpoints and validate generated traces
id: trace-validation
if: (steps.deploy-sample-app.outcome == 'success' || steps.log-validation.outcome == 'failure' || steps.metric-validation.outcome == 'failure') && !cancelled()
run: ./gradlew validator:run --args='-c java/eks-otlp-ocb/trace-validation.yml
--testing-id ${{ env.TESTING_ID }}
--endpoint http://${{ env.APP_ENDPOINT }}
--region us-east-1
--region ${{ env.E2E_TEST_AWS_REGION }}
--account-id ${{ env.ACCOUNT_ID }}
--metric-namespace ${{ env.METRIC_NAMESPACE }}
--log-group ${{ env.LOG_GROUP_NAME }}
Expand All @@ -323,8 +321,6 @@ jobs:
--remote-service-ip ${{ env.REMOTE_SERVICE_POD_IP }}
--query-string ip=${{ env.REMOTE_SERVICE_POD_IP }}&testingId=${{ env.TESTING_ID }}
--rollup'
# TODO: Undo hardcode
# --region ${{ env.E2E_TEST_AWS_REGION }}

- name: Refresh AWS Credentials
if: ${{ github.event.repository.name == 'aws-application-signals-test-framework' }}
Expand Down
4 changes: 2 additions & 2 deletions terraform/java/eks-otlp-ocb/util/appsignals-collector.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ spec:
config: |
extensions:
sigv4auth:
region: "us-east-1"
region: "{E2E_TEST_AWS_REGION}"
service: "xray"
receivers:
Expand Down Expand Up @@ -137,7 +137,7 @@ spec:
exporters:
otlphttp:
traces_endpoint: https://xray.us-east-1.amazonaws.com/v1/traces
traces_endpoint: https://xray.{E2E_TEST_AWS_REGION}.amazonaws.com/v1/traces
auth:
authenticator: sigv4auth
Expand Down

0 comments on commit a87ab45

Please sign in to comment.