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

fix: add retry to cleanup #76

Merged
merged 1 commit into from
Sep 30, 2024
Merged
Changes from all commits
Commits
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
16 changes: 15 additions & 1 deletion .github/workflows/daily-cleanup.yml
Original file line number Diff line number Diff line change
Expand Up @@ -76,9 +76,23 @@ jobs:
tf-bucket-region: ${{ env.TF_S3_REGION }}
max-age-hours-cluster: ${{ env.MAX_AGE_HOURS_CLUSTER }}

# There are cases where the deletion of resources fails due to dependencies.
- name: Retry delete clusters
id: retry_delete_clusters
if: failure() && steps.delete_clusters.outcome == 'failure'
timeout-minutes: 125
uses: ./.github/actions/rosa-cleanup-clusters
env:
RH_TOKEN: ${{ steps.secrets.outputs.RH_OPENSHIFT_TOKEN }}
AWS_REGION: ${{ env.TESTS_AWS_REGION }}
with:
tf-bucket: ${{ env.TF_S3_BUCKET }}
tf-bucket-region: ${{ env.TF_S3_REGION }}
max-age-hours-cluster: ${{ env.MAX_AGE_HOURS_CLUSTER }}

- name: Notify in Slack in case of failure
id: slack-notification
if: failure() && github.event_name == 'schedule'
if: failure() && github.event_name == 'schedule' && steps.retry_delete_clusters.outcome == 'failure'
uses: camunda/infraex-common-config/.github/actions/report-failure-on-slack@fd70dca436c5764e6e90fa6613e7f0adebb83b6d # main
with:
vault_addr: ${{ secrets.VAULT_ADDR }}
Expand Down