Skip to content

Commit

Permalink
feat(ui): Argo Events API and UI. Fixes argoproj#888 (argoproj#4470)
Browse files Browse the repository at this point in the history
Signed-off-by: Alex Collins <[email protected]>
Signed-off-by: Simon Behar <[email protected]>
Signed-off-by: Derek Wang <[email protected]>
Signed-off-by: Saravanan Balasubramanian <[email protected]>

Co-authored-by: Simon Behar <[email protected]>
Co-authored-by: Derek Wang <[email protected]>
Co-authored-by: Saravanan Balasubramanian <[email protected]>
  • Loading branch information
4 people committed Jan 15, 2021
1 parent 17e79e8 commit a8e9348
Show file tree
Hide file tree
Showing 214 changed files with 27,007 additions and 3,747 deletions.
7 changes: 4 additions & 3 deletions .github/workflows/ci-build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -100,16 +100,16 @@ jobs:
- name: Start Argo
env:
GOPATH: /home/runner/go
PROFILE: minimal
PROFILE: mysql
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
mkdir -p /tmp/log/argo-e2e
git fetch --tags
if [ ${{matrix.test}} == test-e2e ]; then
PROFILE=mysql
if [ ${{matrix.test}} == smoke ] || [ ${{matrix.test}} == test-e2e-cron ] ; then
PROFILE=minimal
fi
KUBECONFIG=~/.kube/config make start PROFILE=$PROFILE E2E_EXECUTOR=${{matrix.containerRuntimeExecutor}} ALWAYS_OFFLOAD_NODE_STATUS=${{matrix.alwaysOffloadNodeStatus}} DEV_IMAGE=true STATIC_FILES=false 2>&1 > /tmp/log/argo-e2e/argo.log &
- name: Install gotestsum
Expand Down Expand Up @@ -204,6 +204,7 @@ jobs:
run: |
yarn --cwd ui install
yarn --cwd ui build
yarn --cwd ui test
yarn --cwd ui lint
- name: Ensure nothing changed
run: git diff --exit-code
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,9 @@ git-ask-pass.sh
/pkg/apiclient/clusterworkflowtemplate/cluster-workflow-template.swagger.json
/pkg/apiclient/cronworkflow/cron-workflow.swagger.json
/pkg/apiclient/event/event.swagger.json
/pkg/apiclient/eventsource/eventsource.swagger.json
/pkg/apiclient/info/info.swagger.json
/pkg/apiclient/sensor/sensor.swagger.json
/pkg/apiclient/workflow/workflow.swagger.json
/pkg/apiclient/workflowarchive/workflow-archive.swagger.json
/pkg/apiclient/workflowtemplate/workflow-template.swagger.json
Expand Down
2 changes: 1 addition & 1 deletion .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@ linters:
- goimports
linters-settings:
goimports:
local-prefixes: github.com/argoproj/argo
local-prefixes: github.com/argoproj/argo/
28 changes: 20 additions & 8 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -94,9 +94,9 @@ ifneq ($(GIT_TAG),)
override LDFLAGS += -X github.com/argoproj/argo.gitTag=${GIT_TAG}
endif

ARGOEXEC_PKGS := $(shell echo cmd/argoexec && go list -f '{{ join .Deps "\n" }}' ./cmd/argoexec/ | grep 'argoproj/argo' | cut -c 26-)
CLI_PKGS := $(shell echo cmd/argo && go list -f '{{ join .Deps "\n" }}' ./cmd/argo/ | grep 'argoproj/argo' | cut -c 26-)
CONTROLLER_PKGS := $(shell echo cmd/workflow-controller && go list -f '{{ join .Deps "\n" }}' ./cmd/workflow-controller/ | grep 'argoproj/argo' | cut -c 26-)
ARGOEXEC_PKGS := $(shell echo cmd/argoexec && go list -f '{{ join .Deps "\n" }}' ./cmd/argoexec/ | grep 'argoproj/argo/' | cut -c 26-)
CLI_PKGS := $(shell echo cmd/argo && go list -f '{{ join .Deps "\n" }}' ./cmd/argo/ | grep 'argoproj/argo/' | cut -c 26-)
CONTROLLER_PKGS := $(shell echo cmd/workflow-controller && go list -f '{{ join .Deps "\n" }}' ./cmd/workflow-controller/ | grep 'argoproj/argo/' | cut -c 26-)
MANIFESTS := $(shell find manifests -mindepth 2 -type f)
E2E_MANIFESTS := $(shell find test/e2e/manifests -mindepth 2 -type f)
E2E_EXECUTOR ?= pns
Expand All @@ -107,7 +107,9 @@ SWAGGER_FILES := pkg/apiclient/_.primary.swagger.json \
pkg/apiclient/clusterworkflowtemplate/cluster-workflow-template.swagger.json \
pkg/apiclient/cronworkflow/cron-workflow.swagger.json \
pkg/apiclient/event/event.swagger.json \
pkg/apiclient/eventsource/eventsource.swagger.json \
pkg/apiclient/info/info.swagger.json \
pkg/apiclient/sensor/sensor.swagger.json \
pkg/apiclient/workflow/workflow.swagger.json \
pkg/apiclient/workflowarchive/workflow-archive.swagger.json \
pkg/apiclient/workflowtemplate/workflow-template.swagger.json
Expand Down Expand Up @@ -179,7 +181,7 @@ else
endif

$(GOPATH)/bin/staticfiles:
go get bou.ke/staticfiles
$(call go_install,bou.ke/staticfiles)

server/static/files.go: $(GOPATH)/bin/staticfiles ui/dist/app/index.html
# Pack UI into a Go file.
Expand Down Expand Up @@ -209,7 +211,7 @@ argo-server.key:
.PHONY: cli-image
cli-image: $(CLI_IMAGE_FILE)

$(CLI_IMAGE_FILE): $(CLI_PKGS)
$(CLI_IMAGE_FILE): $(CLI_PKGS) argo-server.crt argo-server.key
$(call docker_build,argocli,argo,$(CLI_IMAGE_FILE))

.PHONY: clis
Expand Down Expand Up @@ -262,7 +264,9 @@ codegen: \
pkg/apiclient/clusterworkflowtemplate/cluster-workflow-template.swagger.json \
pkg/apiclient/cronworkflow/cron-workflow.swagger.json \
pkg/apiclient/event/event.swagger.json \
pkg/apiclient/eventsource/eventsource.swagger.json \
pkg/apiclient/info/info.swagger.json \
pkg/apiclient/sensor/sensor.swagger.json \
pkg/apiclient/workflow/workflow.swagger.json \
pkg/apiclient/workflowarchive/workflow-archive.swagger.json \
pkg/apiclient/workflowtemplate/workflow-template.swagger.json \
Expand All @@ -278,6 +282,7 @@ codegen: \
# `go generate ./...` takes around 10s, so we only run on specific packages.
go generate ./persist/sqldb ./pkg/apiclient/workflow ./server/auth ./server/auth/sso ./workflow/executor
rm -Rf vendor
go mod tidy

$(GOPATH)/bin/mockery:
./hack/recurl.sh dist/mockery.tar.gz https://github.com/vektra/mockery/releases/download/v1.1.1/mockery_1.1.1_$(shell uname -s)_$(shell uname -m).tar.gz
Expand Down Expand Up @@ -312,7 +317,7 @@ $(GOPATH)/bin/swagger:
$(call go_install,github.com/go-swagger/go-swagger/cmd/swagger)

$(GOPATH)/bin/goimports:
go get golang.org/x/tools/cmd/goimports@v0.0.0-20200630154851-b2d8b0336632
$(call go_install,golang.org/x/tools/cmd/goimports)

pkg/apis/workflow/v1alpha1/generated.proto: $(GOPATH)/bin/go-to-protobuf $(PROTO_BINARIES) $(TYPES)
[ -e vendor ] || go mod vendor
Expand All @@ -334,9 +339,15 @@ pkg/apiclient/cronworkflow/cron-workflow.swagger.json: $(PROTO_BINARIES) $(TYPES
pkg/apiclient/event/event.swagger.json: $(PROTO_BINARIES) $(TYPES) pkg/apiclient/event/event.proto
$(call protoc,pkg/apiclient/event/event.proto)

pkg/apiclient/eventsource/eventsource.swagger.json: $(PROTO_BINARIES) $(TYPES) pkg/apiclient/eventsource/eventsource.proto
$(call protoc,pkg/apiclient/eventsource/eventsource.proto)

pkg/apiclient/info/info.swagger.json: $(PROTO_BINARIES) $(TYPES) pkg/apiclient/info/info.proto
$(call protoc,pkg/apiclient/info/info.proto)

pkg/apiclient/sensor/sensor.swagger.json: $(PROTO_BINARIES) $(TYPES) pkg/apiclient/sensor/sensor.proto
$(call protoc,pkg/apiclient/sensor/sensor.proto)

pkg/apiclient/workflow/workflow.swagger.json: $(PROTO_BINARIES) $(TYPES) pkg/apiclient/workflow/workflow.proto
$(call protoc,pkg/apiclient/workflow/workflow.proto)

Expand All @@ -352,6 +363,7 @@ manifests/base/crds/full/argoproj.io_workflows.yaml: $(GOPATH)/bin/controller-ge

dist/kustomize:
mkdir -p dist
rm -f dist/kustomize
./hack/recurl.sh dist/install_kustomize.sh https://raw.githubusercontent.com/kubernetes-sigs/kustomize/master/hack/install_kustomize.sh
chmod +x ./dist/install_kustomize.sh
cd dist && ./install_kustomize.sh 3.8.8
Expand Down Expand Up @@ -426,7 +438,7 @@ test-images:
$(call docker_pull,python:alpine3.6)

$(GOPATH)/bin/goreman:
go get github.com/mattn/goreman
$(call go_install,github.com/mattn/goreman)

.PHONY: start
ifeq ($(RUN_MODE),kubernetes)
Expand Down Expand Up @@ -587,4 +599,4 @@ check-version-warning:

.PHONY: parse-examples
parse-examples:
go run -tags fields ./hack parseexamples
go run -tags fields ./hack parseexamples
2 changes: 1 addition & 1 deletion Procfile
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
controller: DEFAULT_REQUEUE_TIME=${DEFAULT_REQUEUE_TIME} LEADER_ELECTION_IDENTITY=local ALWAYS_OFFLOAD_NODE_STATUS=${ALWAYS_OFFLOAD_NODE_STATUS} OFFLOAD_NODE_STATUS_TTL=30s WORKFLOW_GC_PERIOD=30s UPPERIO_DB_DEBUG=${UPPERIO_DB_DEBUG} ARCHIVED_WORKFLOW_GC_PERIOD=30s ./dist/workflow-controller --executor-image argoproj/argoexec:${VERSION} --namespaced=${NAMESPACED} --namespace ${NAMESPACE} --loglevel ${LOG_LEVEL}
argo-server: UPPERIO_DB_DEBUG=${UPPERIO_DB_DEBUG} ./dist/argo --loglevel ${LOG_LEVEL} server --namespaced=${NAMESPACED} --namespace ${NAMESPACE} --auth-mode ${AUTH_MODE} --secure=$SECURE
argo-server: UPPERIO_DB_DEBUG=${UPPERIO_DB_DEBUG} ./dist/argo --loglevel ${LOG_LEVEL} server --namespaced=${NAMESPACED} --namespace ${NAMESPACE} --auth-mode ${AUTH_MODE} --secure=$SECURE --x-frame-options=SAMEORIGIN
Loading

0 comments on commit a8e9348

Please sign in to comment.