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

fix: reconcile wf when taskresult is added/updated. Fixes #10096 #10097

Merged

Conversation

mweibel
Copy link
Contributor

@mweibel mweibel commented Nov 22, 2022

Re-adds an EventHandler to trigger an update when a WorkflowTaskResult got added/updated. Without this, a workflow progress only gets updated upon completion or every 20mins.

Fixes #10096
Reverts skipping of related Test (#8459)

Please do not open a pull request until you have checked ALL of these:

  • Create the PR as draft .
  • Run make pre-commit -B to fix codegen and lint problems.
  • Sign-off your commits (otherwise the DCO check will fail).
  • Use a conventional commit message (otherwise the commit message check will fail).
  • "Fixes #" is in both the PR title (for release notes) and this description (to automatically link and close the issue).
  • Add unit or e2e tests. Say how you tested your changes. If you changed the UI, attach screenshots.
  • Github checks are green.
  • Once required tests have passed, mark your PR "Ready for review".

@mweibel mweibel force-pushed the taskresult-triggers-workflow-reconcile branch from dd8796c to f65f1c5 Compare November 24, 2022 10:20
Re-adds an EventHandler to trigger an update when a WorkflowTaskResult
got added/updated. Without this, a workflow progress only gets updated
upon completion or every 20mins.

Fixes argoproj#10096, bug introduced in argoproj#8135
Reverts argoproj#8459 to re-add the progress test

Signed-off-by: Michael Weibel <michael@helio.exchange>
@mweibel mweibel force-pushed the taskresult-triggers-workflow-reconcile branch from f65f1c5 to acffcbd Compare November 24, 2022 10:21
@mweibel
Copy link
Contributor Author

mweibel commented Nov 24, 2022

FTR: make pre-commit -B fails for a reason I don't link to this PR:

$ make pre-commit -B
GIT_COMMIT=acffcbd57ea6a36e30d60ff0139917a4510def0f GIT_BRANCH=taskresult-triggers-workflow-reconcile GIT_TAG=untagged GIT_TREE_STATE=dirty RELEASE_TAG=false DEV_BRANCH=true VERSION=latest
KUBECTX=k3d-argowf DOCKER_DESKTOP=false K3D=true DOCKER_PUSH=false
RUN_MODE=local PROFILE=minimal AUTH_MODE=hybrid SECURE=false STATIC_FILES=false ALWAYS_OFFLOAD_NODE_STATUS=false UPPERIO_DB_DEBUG=0 LOG_LEVEL=debug NAMESPACED=true
⚠️ Code generation will not work if code in not checked out into /home/michael/code/go/src/github.com/argoproj/argo-workflows
go install k8s.io/code-generator/cmd/go-to-protobuf@v0.21.5
go install github.com/gogo/protobuf/protoc-gen-gogo@v1.3.2
go install github.com/gogo/protobuf/protoc-gen-gogofast@v1.3.2
go install golang.org/x/tools/cmd/goimports@v0.1.7
go install github.com/grpc-ecosystem/grpc-gateway/protoc-gen-grpc-gateway@v1.16.0
go install github.com/grpc-ecosystem/grpc-gateway/protoc-gen-swagger@v1.16.0
[ -e /home/michael/code/go/src/github.com/gogo/protobuf ] || git clone --depth 1 https://github.com/gogo/protobuf.git -b v1.3.2 /home/michael/code/go/src/github.com/gogo/protobuf
# These files are generated on a v3/ folder by the tool. Link them to the root folder
[ -e ./v3 ] || ln -s . v3
# Format proto files. Formatting changes generated code, so we do it here, rather that at lint time.
# Why clang-format? Google uses it.
find pkg/apiclient -name '*.proto'|xargs clang-format -i
/home/michael/code/go/bin/go-to-protobuf \
        --go-header-file=./hack/custom-boilerplate.go.txt \
        --packages=github.com/argoproj/argo-workflows/v3/pkg/apis/workflow/v1alpha1 \
        --apimachinery-packages=+k8s.io/apimachinery/pkg/util/intstr,+k8s.io/apimachinery/pkg/api/resource,k8s.io/apimachinery/pkg/runtime/schema,+k8s.io/apimachinery/pkg/runtime,k8s.io/apimachinery/pkg/apis/meta/v1,k8s.io/api/core/v1,k8s.io/api/policy/v1beta1 \
        --proto-import /home/michael/code/go/src
topological order bytes
topological order encoding/base64
topological order encoding/json
topological order errors
topological order fmt
topological order github.com/argoproj/argo-workflows/v3/errors
topological order github.com/argoproj/argo-workflows/v3/pkg/apis/workflow
topological order github.com/argoproj/argo-workflows/v3/util/json
topological order github.com/argoproj/argo-workflows/v3/util/slice
topological order github.com/gogo/protobuf/proto
topological order github.com/gogo/protobuf/sortkeys
topological order github.com/google/gofuzz
topological order go/ast
topological order go/doc
topological order go/parser
topological order go/token
topological order gopkg.in/inf.v0
topological order hash/fnv
topological order io
topological order io/ioutil
topological order k8s.io/apimachinery/pkg/conversion
topological order k8s.io/apimachinery/pkg/conversion/queryparams
topological order k8s.io/apimachinery/pkg/fields
topological order k8s.io/apimachinery/pkg/labels
topological order k8s.io/apimachinery/pkg/selection
topological order k8s.io/apimachinery/pkg/types
topological order k8s.io/apimachinery/pkg/util/errors
topological order k8s.io/apimachinery/pkg/util/json
topological order k8s.io/apimachinery/pkg/util/naming
topological order k8s.io/apimachinery/pkg/util/runtime
topological order k8s.io/apimachinery/pkg/util/sets
topological order k8s.io/apimachinery/pkg/util/validation
topological order k8s.io/apimachinery/pkg/util/wait
topological order k8s.io/apimachinery/pkg/watch
topological order k8s.io/klog/v2
topological order k8s.io/kube-openapi/pkg/common
topological order k8s.io/kube-openapi/pkg/validation/spec
topological order math
topological order math/big
topological order math/bits
topological order net/http
topological order net/url
topological order os
topological order path
topological order path/filepath
topological order reflect
topological order regexp
topological order runtime/debug
topological order sigs.k8s.io/structured-merge-diff/v4/value
topological order sigs.k8s.io/yaml
topological order sort
topological order strconv
topological order strings
topological order sync
topological order sync/atomic
topological order time
topological order unsafe
topological order k8s.io/apimachinery/pkg/runtime/schema
topological order k8s.io/apimachinery/pkg/util/intstr
topological order k8s.io/apimachinery/pkg/api/resource
topological order k8s.io/apimachinery/pkg/runtime
topological order k8s.io/apimachinery/pkg/apis/meta/v1
topological order k8s.io/api/core/v1
topological order k8s.io/api/policy/v1beta1
topological order github.com/argoproj/argo-workflows/v3/pkg/apis/workflow/v1alpha1
2022/11/24 11:21:48 /home/michael/code/opensource/argo-workflows/vendor/k8s.io/apimachinery/pkg/util/intstr/generated.proto: File does not reside within any path specified using --proto_path (or -I).  You must specify a --proto_path which encompasses this file.  Note that the proto_path must be an exact prefix of the .proto file names -- protoc is too dumb to figure out when two paths (e.g. absolute and relative) are equivalent (it's harder than you think).
2022/11/24 11:21:48 protoc -I . -I /home/michael/code/go/src -I /home/michael/code/go/src --gogo_out=/home/michael/code/go/src /home/michael/code/opensource/argo-workflows/vendor/k8s.io/apimachinery/pkg/util/intstr/generated.proto
2022/11/24 11:21:48 Unable to generate protoc on k8s.io.apimachinery.pkg.util.intstr: exit status 1
make: *** [Makefile:314: pkg/apis/workflow/v1alpha1/generated.proto] Error 1

@mweibel mweibel marked this pull request as ready for review November 24, 2022 11:48
@alexec alexec merged commit e5ea21e into argoproj:master Nov 24, 2022
@mweibel mweibel deleted the taskresult-triggers-workflow-reconcile branch November 28, 2022 06:34
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.

self reporting progress does not work because WorkflowTaskResult doesn't trigger workflow reconciliation
2 participants