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

build: Add make nuke; speed-up make start #5583

Merged
merged 1 commit into from
Apr 4, 2021
Merged

Conversation

alexec
Copy link
Contributor

@alexec alexec commented Apr 2, 2021

No description provided.

Signed-off-by: Alex Collins <alex_collins@intuit.com>
@codecov
Copy link

codecov bot commented Apr 2, 2021

Codecov Report

Merging #5583 (b9c33f2) into master (4e450e2) will increase coverage by 0.08%.
The diff coverage is n/a.

❗ Current head b9c33f2 differs from pull request most recent head d9fe43f. Consider uploading reports for the commit d9fe43f to get more accurate results
Impacted file tree graph

@@            Coverage Diff             @@
##           master    #5583      +/-   ##
==========================================
+ Coverage   47.01%   47.10%   +0.08%     
==========================================
  Files         240      240              
  Lines       15002    15002              
==========================================
+ Hits         7053     7066      +13     
+ Misses       7048     7038      -10     
+ Partials      901      898       -3     
Impacted Files Coverage Δ
workflow/controller/operator.go 70.96% <0.00%> (+0.27%) ⬆️
cmd/argo/commands/get.go 58.00% <0.00%> (+2.00%) ⬆️
workflow/metrics/server.go 16.66% <0.00%> (+4.16%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 4e450e2...d9fe43f. Read the comment docs.

@@ -444,7 +460,7 @@ $(GOPATH)/bin/goreman:

.PHONY: start
ifeq ($(RUN_MODE),local)
start: install executor-image controller cli $(GOPATH)/bin/goreman
start: install controller cli $(GOPATH)/bin/goreman
Copy link
Contributor Author

Choose a reason for hiding this comment

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

this change means that we don't wait for the executor to be built before starting up, useful for UI only work

controller: PNS_PRIVILEGED=true 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 ${IMAGE_NAMESPACE}/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 --x-frame-options=SAMEORIGIN
ui: yarn --cwd ui install && yarn --cwd ui start
executor-image : make executor-image
Copy link
Contributor Author

Choose a reason for hiding this comment

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

we build it here instead

Copy link
Member

Choose a reason for hiding this comment

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

Do we have to wait to start workflows in this case? Is there a way to know when we are ready to do so? I guess Pods will just take longer to start up, although they could BackOff

@alexec alexec requested a review from simster7 April 2, 2021 18:32
@alexec alexec changed the title build: Add make nuke; speed up make start build: Add make nuke; speed-up make start Apr 2, 2021
@@ -57,7 +55,9 @@ endif
# * `local` run the workflow–controller and argo-server as single replicas on the local machine (default)
# * `kubernetes` run the workflow-controller and argo-server on the Kubernetes cluster
RUN_MODE := local
K3D := $(shell if [[ "`which kubectl`" != '' ]] && [[ "`kubectl config current-context`" == "k3d-"* ]]; then echo true; else echo false; fi)
KUBECTX := $(shell [[ "`which kubectl`" != '' ]] && kubectl config current-context || echo none)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

you only get make nuke for KUBECTX=docker-desktop OR KUBECTX=k3d-*

@alexec
Copy link
Contributor Author

alexec commented Apr 2, 2021

Unable to connect to the server: dial tcp 10.1.0.36:6443: i/o timeout

@@ -416,6 +420,18 @@ ifeq ($(RUN_MODE),kubernetes)
kubectl -n $(KUBE_NAMESPACE) scale deploy/argo-server --replicas 1
endif

# nuke is like "clean" but attempts to return you to a state as if it had never been installed at all
# this only available in "safe" local development
ifeq (true,$(filter true, $(DOCKER_DESKTOP) $(K3D)))
Copy link
Member

Choose a reason for hiding this comment

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

k3d is not guaranteed to be a dev env, but if you're using make nuke you better know what you're doing.

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 hope that "nuke" help people be careful - but k3d should only be desktop - k3s might not

controller: PNS_PRIVILEGED=true 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 ${IMAGE_NAMESPACE}/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 --x-frame-options=SAMEORIGIN
ui: yarn --cwd ui install && yarn --cwd ui start
executor-image : make executor-image
Copy link
Member

Choose a reason for hiding this comment

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

Do we have to wait to start workflows in this case? Is there a way to know when we are ready to do so? I guess Pods will just take longer to start up, although they could BackOff

@alexec
Copy link
Contributor Author

alexec commented Apr 4, 2021

Do we have to wait to start workflows in this case? Is there a way to know when we are ready to do so? I guess Pods will just take longer to start up, although they could BackOff

Yes. This will always be shorter than current.

@alexec alexec marked this pull request as ready for review April 4, 2021 17:09
@alexec alexec merged commit 1dbae73 into argoproj:master Apr 4, 2021
@alexec alexec deleted the nuke branch April 4, 2021 17:09
@simster7 simster7 mentioned this pull request Apr 19, 2021
50 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants