Skip to content

Commit

Permalink
feat(executor): Reduce poll time 3s to 1s for PNS and Emissary execut…
Browse files Browse the repository at this point in the history
…ors (#5386)
  • Loading branch information
alexec authored Mar 16, 2021
1 parent 4c4cbd2 commit 8e13758
Show file tree
Hide file tree
Showing 53 changed files with 332 additions and 1,378 deletions.
114 changes: 111 additions & 3 deletions .github/workflows/ci-build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ on:
- "master"

jobs:

tests:
name: Unit Tests
runs-on: ubuntu-20.04
Expand All @@ -31,7 +30,90 @@ jobs:
- run: go mod download -x
- run: make server/static/files.go STATIC_FILES=false
- run: go build -v ./...
- run: make test STATIC_FILES=false
- run: make test STATIC_FILES=false GOTEST='go test -covermode=atomic -coverprofile=coverage.out'
- run: bash <(curl -s https://codecov.io/bash)

e2e-tests:
name: E2E Tests
runs-on: ubuntu-20.04
timeout-minutes: 20
strategy:
fail-fast: false
matrix:
test:
- test-executor
containerRuntimeExecutor:
- docker
- emissary
- k8sapi
- kubelet
- pns
include:
- test: test-api
containerRuntimeExecutor: emissary
- test: test-cli
containerRuntimeExecutor: emissary
- test: test-functional
containerRuntimeExecutor: emissary
- test: test-cron
containerRuntimeExecutor: emissary
steps:
- uses: actions/checkout@v2
- uses: actions/setup-go@v2
with:
go-version: "1.15.7"
- uses: actions/cache@v2
with:
path: /home/runner/.cache/go-build
key: GOCACHE-v2-${{ hashFiles('**/go.mod') }}
- uses: actions/cache@v2
with:
path: /home/runner/go/pkg/mod
key: GOMODCACHE-v2-${{ hashFiles('**/go.mod') }}
- uses: actions/cache@v2
with:
path: /home/runner/go/bin
key: go-bin-v1-${{ hashFiles('**/go.mod') }}
- uses: actions/cache@v2
with:
path: dist/kustomize
key: kustomize
- run: make pull-images &
- name: Install and start K3S v1.18.8+k3s1
run: curl -sfL https://get.k3s.io | INSTALL_K3S_VERSION=v1.18.8+k3s1 INSTALL_K3S_CHANNEL=stable INSTALL_K3S_EXEC=--docker K3S_KUBECONFIG_MODE=644 sh - &
- name: Create Kubeconfig
run: |
mkdir -p ~/.kube
until stat /etc/rancher/k3s/k3s.yaml ; do sleep 10s ; done
cat /etc/rancher/k3s/k3s.yaml | sed "s/127.0.0.1/$(hostname)/g" > ~/.kube/config
echo "- name: fake_token_user" >> ~/.kube/config
echo " user:" >> ~/.kube/config
echo " token: xxxxxx" >> ~/.kube/config
- run: git fetch --tags
- name: Start Argo
run: |
echo '127.0.0.1 dex' | sudo tee -a /etc/hosts
echo '127.0.0.1 minio' | sudo tee -a /etc/hosts
echo '127.0.0.1 postgres' | sudo tee -a /etc/hosts
echo '127.0.0.1 mysql' | sudo tee -a /etc/hosts
PROFILE=minimal
ALWAYS_OFFLOAD_NODE_STATUS=false
if [ "${{matrix.test}}" = test-cli ] || [ "${{matrix.test}}" = test-api ]; then
PROFILE=mysql
ALWAYS_OFFLOAD_NODE_STATUS=true
fi
mkdir -p /tmp/log/argo-e2e
KUBECONFIG=~/.kube/config make install PROFILE=$PROFILE E2E_EXECUTOR=${{matrix.containerRuntimeExecutor}} ALWAYS_OFFLOAD_NODE_STATUS=${ALWAYS_OFFLOAD_NODE_STATUS} STATIC_FILES=false DEV_IMAGE=true LOG_LEVEL=info
KUBECONFIG=~/.kube/config make start PROFILE=$PROFILE E2E_EXECUTOR=${{matrix.containerRuntimeExecutor}} ALWAYS_OFFLOAD_NODE_STATUS=${ALWAYS_OFFLOAD_NODE_STATUS} STATIC_FILES=false DEV_IMAGE=true LOG_LEVEL=info 2>&1 > /tmp/log/argo-e2e/argo.log &
- run: make wait
- run: make logs > /tmp/log/argo-e2e/pod.log &
- run: make ${{matrix.test}}
- name: Upload logs
if: ${{ failure() }}
uses: actions/upload-artifact@v1
with:
name: ${{matrix.test}}-${{matrix.containerRuntimeExecutor}}
path: /tmp/log/argo-e2e

codegen:
name: Codegen
Expand Down Expand Up @@ -78,6 +160,32 @@ jobs:
mkdir -p /home/runner/go/src/github.com/argoproj
ln -s "$PWD" /home/runner/go/src/github.com/argoproj/argo-workflows
- run: make codegen -B STATIC_FILES=false
- run: make lint STATIC_FILES=false
- uses: golangci/golangci-lint-action@v2
with:
version: v1.36.0
skip-go-installation: true
skip-pkg-cache: true
skip-build-cache: true
- run: make validate-examples STATIC_FILES=false
- run: git diff --exit-code

ui:
name: UI
runs-on: ubuntu-20.04
timeout-minutes: 6
env:
NODE_OPTIONS: --max-old-space-size=4096
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: "14"
- uses: actions/cache@v1
with:
path: ui/node_modules
key: ${{ runner.os }}-node-dep-v1-${{ hashFiles('**/yarn.lock') }}
- run: yarn --cwd ui install
- run: yarn --cwd ui build
- run: yarn --cwd ui test
- run: yarn --cwd ui lint
- run: git diff --exit-code
29 changes: 0 additions & 29 deletions .github/workflows/ci-gen.sh

This file was deleted.

75 changes: 0 additions & 75 deletions .github/workflows/e2e.yaml.0

This file was deleted.

76 changes: 0 additions & 76 deletions .github/workflows/test-cli-docker.yaml

This file was deleted.

76 changes: 0 additions & 76 deletions .github/workflows/test-e2e-cron-docker.yaml

This file was deleted.

Loading

0 comments on commit 8e13758

Please sign in to comment.