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

Various fixes for long-running tests #8680

Open
wants to merge 4 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
13 changes: 8 additions & 5 deletions .github/scripts/cleanup-long-running-cluster.sh
Original file line number Diff line number Diff line change
Expand Up @@ -49,13 +49,16 @@ fi

# Delete all test namespaces.
echo "delete all test namespaces"
namespaces=$(kubectl get namespace |
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IMO this system is too complicated. Instead I think it's better to specify the namespaces we want to keep and delete everything else. Looks like there's already been some discussion about this: #7966

grep -E '^kubernetes-interop-tutorial.*|^corerp.*|^test.*|^default-.*|^radiusfunctionaltestbucket.*|^radius-test.*|^kubernetes-cli.*|^dpsb-.*|^dsrp-.*|^azstorage-workload.*|^dapr-serviceinvocation|^daprrp-rs-.*|^dapr-sts-.*|^mynamespace.*|^demo.*|^tutorial-demo.*|^ms.+' |
awk '{print $1}')
namespace_whitelist=("cert-manager" "dapr-system" "default" "gatekeeper-system" "kube-node-lease" "kube-public" "kube-system" "radius-system")
namespaces=$(kubectl get namespaces --no-headers -o custom-columns=":metadata.name")
for ns in $namespaces; do
if [ -z "$ns" ]; then
break
fi
echo "deleting namespaces: $ns"
kubectl delete namespace $ns --ignore-not-found=true
if [[ " ${namespace_whitelist[@]} " =~ " ${ns} " ]]; then
echo "skip deletion: $ns"
else
echo "deleting namespaces: $ns"
kubectl delete namespace $ns --ignore-not-found=true
fi
done
7 changes: 5 additions & 2 deletions .github/workflows/long-running-azure.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,13 @@ on:
workflow_dispatch:
inputs:
skip-build:
description: 'Skip build (true/false)'
description: 'Skip build (true/false). Setting to false will cause the tests to run with the latest changes from the main branch.'
required: false
default: 'true'
type: string
type: choice
options:
- 'true'
- 'false'
schedule:
# Run every 2 hours
- cron: "0 */2 * * *"
Expand Down
2 changes: 1 addition & 1 deletion test/infra/azure/main.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ module aksCluster './modules/akscluster.bicep' = {
params: {
name: aksClusterName
location: location
kubernetesVersion: '1.28.5'
kubernetesVersion: '1.31.5'
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was unable to run this bicep deployment locally because of the outdated kubernetes version. This should make sure that next time we create a long-running test cluster we won't hit this issue.

logAnalyticsWorkspaceId: logAnalyticsWorkspace.outputs.id
systemAgentPoolName: 'agentpool'
systemAgentPoolVmSize: 'Standard_D4as_v5'
Expand Down
Loading