Skip to content

Commit

Permalink
Fix failing CI in 0.27 branch (#881)
Browse files Browse the repository at this point in the history
* Fix Dapr sample in CI (#817)

* Adding debug for pod list

Signed-off-by: willdavsmith <willdavsmith@gmail.com>

* Adding debug for pod list

Signed-off-by: willdavsmith <willdavsmith@gmail.com>

* Adding debug for pod list

Signed-off-by: willdavsmith <willdavsmith@gmail.com>

* Adding debug for pod list

Signed-off-by: willdavsmith <willdavsmith@gmail.com>

* Adding debug for pod list

Signed-off-by: willdavsmith <willdavsmith@gmail.com>

* make sure it's not flaky

Signed-off-by: willdavsmith <willdavsmith@gmail.com>

* remove debug

Signed-off-by: willdavsmith <willdavsmith@gmail.com>

---------

Signed-off-by: willdavsmith <willdavsmith@gmail.com>
(cherry picked from commit 5f6bd44)

* Force delete Radius application, EKS Cluster, and AWS resources on failed workflow run (#843)

Signed-off-by: willdavsmith <willdavsmith@gmail.com>
(cherry picked from commit 4855d47)
  • Loading branch information
willdavsmith authored Nov 28, 2023
1 parent 012d8be commit a420f9e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions .github/scripts/delete-aws-resources.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
# ------------------------------------------------------------


APP_NAME=$1
APP_LABEL='RadiusApplication'
APP_ID=$1
APP_LABEL='radapp.io/application'
RESOURCE_TYPES='AWS::RDS::DBInstance,AWS::RDS::DBSubnetGroup,AWS::MemoryDB::Cluster,AWS::MemoryDB::SubnetGroup'

# File to store the list of deleted resources
Expand All @@ -45,7 +45,7 @@ function delete_aws_resources() {
do
key=$(jq -r '.Key' <<< "$tag")
value=$(jq -r '.Value' <<< "$tag")
if [[ "$key" == "$APP_LABEL" && "$value" == "$APP_NAME" ]]
if [[ "$key" == "$APP_LABEL" && "$value" == "$APP_ID" ]]
then
echo "Deleting resource of type: $resource_type with identifier: $identifier"
echo "$identifier\n" >> $DELETED_RESOURCES_FILE
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ jobs:
run: |
namespace="${{ matrix.env }}-${{ matrix.app }}"
label="radapp.io/application=${{ matrix.app }}"
kubectl wait --for=condition=Ready pod -l $label -n $namespace --timeout=5m
kubectl rollout status deployment -l $label -n $namespace --timeout=90s
- name: Run Playwright Test
if: steps.gen-id.outputs.RUN_TEST == 'true' && matrix.uiTestFile != ''
id: run-playwright-test
Expand Down Expand Up @@ -289,7 +289,7 @@ jobs:
run: gh issue create --title "Samples deployment failed for ${{ matrix.app }}" --body "Test failed on ${{ github.repository }}. See [workflow logs](${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}) for more details." --repo ${{ github.repository }} --label bug --label test-failure
# Cleanup
- name: Delete app
if: steps.gen-id.outputs.RUN_TEST == 'true'
if: always() && steps.gen-id.outputs.RUN_TEST == 'true'
run: |
rad app delete ${{ matrix.app }} -y
- name: Delete Azure resource group
Expand All @@ -305,12 +305,12 @@ jobs:
if: always() && steps.gen-id.outputs.RUN_TEST == 'true' && matrix.credential == 'aws'
run: |
# Delete all AWS resources created by the test
./.github/scripts/delete-aws-resources.sh ${{ matrix.app }}
./.github/scripts/delete-aws-resources.sh '/planes/radius/local/resourcegroups/default/providers/Applications.Core/applications/${{ matrix.app }}'
- name: Delete EKS Cluster
if: always() && steps.gen-id.outputs.RUN_TEST == 'true' && matrix.credential == 'aws'
run: |
# Uninstall Radius from EKS cluster
rad uninstall kubernetes
# Delete EKS cluster
echo "Deleting EKS cluster: ${{ steps.gen-id.outputs.TEST_EKS_CLUSTER_NAME }}"
eksctl delete cluster --name ${{ steps.gen-id.outputs.TEST_EKS_CLUSTER_NAME }} --region ${{ env.AWS_REGION }} --wait
eksctl delete cluster --name ${{ steps.gen-id.outputs.TEST_EKS_CLUSTER_NAME }} --region ${{ env.AWS_REGION }} --wait --force

0 comments on commit a420f9e

Please sign in to comment.