Skip to content

Commit

Permalink
Merge branch 'main' into fix/mutex-msg
Browse files Browse the repository at this point in the history
  • Loading branch information
Joibel authored Sep 26, 2024
2 parents 104058f + bf64aeb commit 4a77ddb
Show file tree
Hide file tree
Showing 4 changed files with 51 additions and 20 deletions.
55 changes: 38 additions & 17 deletions .github/workflows/ci-build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,9 @@ jobs:
- Dockerfile
- manifests/**
- sdks/**
# example test suite
- examples/**
- hack/test-examples.sh
codegen:
- *common
# generated files
Expand Down Expand Up @@ -196,47 +199,54 @@ jobs:
include:
- test: test-executor
profile: minimal
useApi: false
use-api: false
- test: test-corefunctional
profile: minimal
useApi: false
use-api: false
- test: test-functional
profile: minimal
useApi: false
use-api: false
- test: test-api
profile: mysql
useApi: true
use-api: true
- test: test-cli
profile: mysql
useApi: true
use-api: true
- test: test-cron
profile: minimal
useApi: false
use-api: false
- test: test-examples
profile: minimal
useApi: false
use-api: false
- test: test-plugins
profile: plugins
useApi: false
use-api: false
- test: test-java-sdk
profile: minimal
useApi: true
use-api: true
- test: test-python-sdk
profile: minimal
useApi: true
use-api: true
- test: test-executor
install_k3s_version: v1.28.13+k3s1
profile: minimal
useApi: false
use-api: false
- test: test-corefunctional
install_k3s_version: v1.28.13+k3s1
profile: minimal
useApi: false
use-api: false
- test: test-functional
install_k3s_version: v1.28.13+k3s1
profile: minimal
useApi: false
use-api: false
steps:
- name: Free up disk space
run: |
printf "==> Available space before cleanup\n"
df -h
sudo rm -rf /usr/share/dotnet /usr/local/lib/android /opt/ghc /usr/local/.ghcup /opt/hostedtoolcache/CodeQL
printf "==> Available space after cleanup\n"
df -h
- name: Install socat (needed by Kubernetes)
run: sudo apt-get -y install socat
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
Expand Down Expand Up @@ -264,7 +274,15 @@ jobs:
else
export INSTALL_K3S_VERSION=${{ matrix.install_k3s_version }}
fi
curl -sfL https://get.k3s.io | INSTALL_K3S_CHANNEL=stable INSTALL_K3S_EXEC=--docker K3S_KUBECONFIG_MODE=644 sh -
cat >/tmp/kubelet.config <<EOT
apiVersion: kubelet.config.k8s.io/v1beta1
kind: KubeletConfiguration
imageMinimumGCAge: 1h
imageGCHighThresholdPercent: 100
EOT
curl -sfL https://get.k3s.io | INSTALL_K3S_CHANNEL=stable INSTALL_K3S_EXEC='--docker --kubelet-arg=config=/tmp/kubelet.config' K3S_KUBECONFIG_MODE=644 sh -
until kubectl --kubeconfig=/etc/rancher/k3s/k3s.yaml cluster-info ; do sleep 10s ; done
cp /etc/rancher/k3s/k3s.yaml /home/runner/.kubeconfig
echo "- name: fake_token_user" >> $KUBECONFIG
Expand Down Expand Up @@ -294,22 +312,25 @@ jobs:
run: make controller kit STATIC_FILES=false
- name: Build CLI
run: make cli STATIC_FILES=false
if: ${{matrix.useApi}}
if: ${{matrix.use-api}}
- name: Start controller/API
run: |
make start PROFILE=${{matrix.profile}} \
AUTH_MODE=client STATIC_FILES=false \
LOG_LEVEL=info \
API=${{matrix.useApi}} \
API=${{matrix.use-api}} \
UI=false \
POD_STATUS_CAPTURE_FINALIZER=true > /tmp/argo.log 2>&1 &
- name: Wait for controller to be up
run: make wait API=${{matrix.useApi}}
run: make wait PROFILE=${{matrix.profile}} API=${{matrix.use-api}}
timeout-minutes: 5
- name: Run tests ${{matrix.test}}
run: make ${{matrix.test}} E2E_SUITE_TIMEOUT=20m STATIC_FILES=false

# failure debugging below
- name: Failure debug - k3s logs
if: ${{ failure() }}
run: journalctl -u k3s
- name: Failure debug - describe MinIO/MySQL deployment
if: ${{ failure() }}
run: |
Expand Down
4 changes: 4 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -574,6 +574,10 @@ ifeq ($(API),true)
# Wait for Argo Server
until lsof -i :2746 > /dev/null ; do sleep 10s ; done
endif
ifeq ($(PROFILE),mysql)
# Wait for MySQL
until (: < /dev/tcp/localhost/3306) ; do sleep 10s ; done
endif

.PHONY: postgres-cli
postgres-cli:
Expand Down
9 changes: 6 additions & 3 deletions hack/test-examples.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,15 @@ done
trap 'kubectl get wf' EXIT

grep -lR 'workflows.argoproj.io/test' examples/* | while read f ; do
kubectl delete workflow -l workflows.argoproj.io/test
echo "Running $f..."
kubectl create -f $f
name=$(kubectl get workflow -o name)
name=$(kubectl create -f $f -o name)

echo "Waiting for completion of $f..."
kubectl wait --for=condition=Completed $name
phase="$(kubectl get $name -o 'jsonpath={.status.phase}')"
echo " -> $phase"
test Succeeded == $phase

echo "Deleting $f..."
kubectl delete $name
done
3 changes: 3 additions & 0 deletions util/errors/errors.go
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,9 @@ func isTransientNetworkErr(err error) bool {
} else if strings.Contains(errorString, "connect: connection refused") {
// If err is connection refused, retry.
return true
} else if strings.Contains(errorString, "invalid connection") {
// If err is invalid connection, retry.
return true
}

return false
Expand Down

0 comments on commit 4a77ddb

Please sign in to comment.