From 4596d47d6cffcf54da29bbb6c9b3179a44309353 Mon Sep 17 00:00:00 2001 From: Ryan Richard Date: Fri, 3 Jan 2025 15:07:09 -0800 Subject: [PATCH] Revert "temp change in job to remove orphaned AKS clusters for manual testing" This reverts commit b9984d2f9245543f6b3e05ee49d89f91d8d6d5b3. --- pipelines/shared-tasks/remove-orphaned-aks-clusters/task.sh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/pipelines/shared-tasks/remove-orphaned-aks-clusters/task.sh b/pipelines/shared-tasks/remove-orphaned-aks-clusters/task.sh index a9f363e71..2dd3a5081 100755 --- a/pipelines/shared-tasks/remove-orphaned-aks-clusters/task.sh +++ b/pipelines/shared-tasks/remove-orphaned-aks-clusters/task.sh @@ -67,8 +67,7 @@ while IFS="" read -r line || [ -n "$line" ]; do # UTC date format example: 2025-01-03T20:13:02.5855661Z # Note that this date command may not work on MacOS. creation_time_seconds_since_epoch=$(date -u -d "$creation_time" '+%s') - # TODO: Revert this change the math below back to being hours_ago_to_delete * 60 * 60. This commit is only to manually test that this job will really delete clusters that it finds. - if (($((now_in_seconds_since_epoch - creation_time_seconds_since_epoch)) > $((60)))); then + if (($((now_in_seconds_since_epoch - creation_time_seconds_since_epoch)) > $((hours_ago_to_delete * 60 * 60)))); then clusters_to_remove+=("$cluster_name") echo "$cluster_name $creation_time (older than $hours_ago_to_delete hours)" else