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

ci,fix: Eagerly cache access tokens in automated-cleanup-resources #3433

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
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
11 changes: 11 additions & 0 deletions .github/workflows/automated-cleanup-resources.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,17 @@ jobs:
bash setup.sh
working-directory: cli
continue-on-error: true
- name: Eagerly cache access tokens for required scopes
run: |
# Workaround for azure-cli's lack of support for ID token refresh
# Taken from: https://github.com/Azure/login/issues/372#issuecomment-2056289617

# Management
az account get-access-token --scope https://management.azure.com/.default --output none
# ML
az account get-access-token --scope https://ml.azure.com/.default --output none

pwsh -c "Connect-AzAccount"
- name: Perform Cleanup
run: |
source "${{ github.workspace }}/infra/bootstrapping/sdk_helpers.sh";
Expand Down
4 changes: 2 additions & 2 deletions infra/bootstrapping/cleanup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ SAMPLES_WORKSPACE_LIST=$(az ml workspace list --query "[*].[name]" -o tsv | grep
echo "SAMPLES_WORKSPACE_LIST: $SAMPLES_WORKSPACE_LIST"

# Wait for 2 hours so that we don't delete entities that are still in use.
echo waiting
sleep 2h
# echo waiting
# sleep 2h

# Delete online endpoints
for i in $ONLINE_ENDPOINT_LIST; do
Expand Down
Loading