diff --git a/Gopkg.lock b/Gopkg.lock deleted file mode 100644 index 6ec5d151d2..0000000000 --- a/Gopkg.lock +++ /dev/null @@ -1,863 +0,0 @@ -# This file is autogenerated, do not edit; changes may be undone by the next 'dep ensure'. - - -[[projects]] - name = "github.com/DataDog/zstd" - packages = ["."] - revision = "c7161f8c63c045cbc7ca051dcc969dd0e4054de2" - version = "v1.3.5" - -[[projects]] - name = "github.com/PuerkitoBio/purell" - packages = ["."] - revision = "0bcb03f4b4d0a9428594752bd2a3b9aa0a9d4bd4" - version = "v1.1.0" - -[[projects]] - branch = "master" - name = "github.com/PuerkitoBio/urlesc" - packages = ["."] - revision = "de5bf2ad457846296e2031421a34e2568e304e35" - -[[projects]] - name = "github.com/Shopify/sarama" - packages = ["."] - revision = "03a43f93cd29dc549e6d9b11892795c206f9c38c" - version = "v1.20.1" - -[[projects]] - name = "github.com/argoproj/argo" - packages = [ - "pkg/apis/workflow", - "pkg/apis/workflow/v1alpha1" - ] - revision = "0a928e93dac6d8522682931a0a68c52add310cdb" - version = "v2.2.1" - -[[projects]] - name = "github.com/davecgh/go-spew" - packages = ["spew"] - revision = "8991bc29aa16c548c550c7ff78260e27b9ab7c73" - version = "v1.1.1" - -[[projects]] - name = "github.com/dustin/go-humanize" - packages = ["."] - revision = "9f541cc9db5d55bce703bd99987c9d5cb8eea45e" - version = "v1.0.0" - -[[projects]] - name = "github.com/eapache/go-resiliency" - packages = ["breaker"] - revision = "ea41b0fad31007accc7f806884dcdf3da98b79ce" - version = "v1.1.0" - -[[projects]] - branch = "master" - name = "github.com/eapache/go-xerial-snappy" - packages = ["."] - revision = "776d5712da21bc4762676d614db1d8a64f4238b0" - -[[projects]] - name = "github.com/eapache/queue" - packages = ["."] - revision = "44cc805cf13205b55f69e14bcb69867d1ae92f98" - version = "v1.1.0" - -[[projects]] - name = "github.com/eclipse/paho.mqtt.golang" - packages = [ - ".", - "packets" - ] - revision = "36d01c2b4cbeb3d2a12063e4880ce30800af9560" - version = "v1.1.1" - -[[projects]] - name = "github.com/emicklei/go-restful" - packages = [ - ".", - "log" - ] - revision = "e37671aced663c8d3a395bd301857e26dcf4340c" - version = "v2.8.1" - -[[projects]] - branch = "master" - name = "github.com/fsnotify/fsnotify" - packages = ["."] - revision = "ccc981bf80385c528a65fbfdd49bf2d8da22aa23" - -[[projects]] - branch = "master" - name = "github.com/ghodss/yaml" - packages = ["."] - revision = "c7ce16629ff4cd059ed96ed06419dd3856fd3577" - -[[projects]] - name = "github.com/go-ini/ini" - packages = ["."] - revision = "6ed8d5f64cd79a498d1f3fab5880cc376ce41bbe" - version = "v1.41.0" - -[[projects]] - name = "github.com/go-openapi/jsonpointer" - packages = ["."] - revision = "ef5f0afec364d3b9396b7b77b43dbe26bf1f8004" - version = "v0.18.0" - -[[projects]] - name = "github.com/go-openapi/jsonreference" - packages = ["."] - revision = "8483a886a90412cd6858df4ea3483dce9c8e35a3" - version = "v0.18.0" - -[[projects]] - name = "github.com/go-openapi/spec" - packages = ["."] - revision = "5b6cdde3200976e3ecceb2868706ee39b6aff3e4" - version = "v0.18.0" - -[[projects]] - name = "github.com/go-openapi/swag" - packages = ["."] - revision = "1d29f06aebd59ccdf11ae04aa0334ded96e2d909" - version = "v0.18.0" - -[[projects]] - name = "github.com/gogo/protobuf" - packages = [ - "gogoproto", - "plugin/compare", - "plugin/defaultcheck", - "plugin/description", - "plugin/embedcheck", - "plugin/enumstringer", - "plugin/equal", - "plugin/face", - "plugin/gostring", - "plugin/marshalto", - "plugin/oneofcheck", - "plugin/populate", - "plugin/size", - "plugin/stringer", - "plugin/testgen", - "plugin/union", - "plugin/unmarshal", - "proto", - "protoc-gen-gofast", - "protoc-gen-gogo/descriptor", - "protoc-gen-gogo/generator", - "protoc-gen-gogo/generator/internal/remap", - "protoc-gen-gogo/grpc", - "protoc-gen-gogo/plugin", - "protoc-gen-gogofast", - "sortkeys", - "vanity", - "vanity/command" - ] - revision = "4cbf7e384e768b4e01799441fdf2a706a5635ae7" - version = "v1.2.0" - -[[projects]] - branch = "master" - name = "github.com/golang/glog" - packages = ["."] - revision = "23def4e6c14b4da8ac2ed8007337bc5eb5007998" - -[[projects]] - branch = "master" - name = "github.com/golang/protobuf" - packages = [ - "proto", - "protoc-gen-go", - "protoc-gen-go/descriptor", - "protoc-gen-go/generator", - "protoc-gen-go/generator/internal/remap", - "protoc-gen-go/grpc", - "protoc-gen-go/plugin", - "ptypes", - "ptypes/any", - "ptypes/duration", - "ptypes/timestamp" - ] - revision = "347cf4a86c1cb8d262994d8ef5924d4576c5b331" - -[[projects]] - branch = "master" - name = "github.com/golang/snappy" - packages = ["."] - revision = "2e65f85255dbc3072edf28d6b5b8efc472979f5a" - -[[projects]] - name = "github.com/google/go-github" - packages = ["github"] - revision = "56cb1dd99043eba2e21c91aa8417d3ba2329259a" - version = "v21.0.1" - -[[projects]] - name = "github.com/google/go-querystring" - packages = ["query"] - revision = "44c6ddd0a2342c386950e880b658017258da92fc" - version = "v1.0.0" - -[[projects]] - branch = "master" - name = "github.com/google/gofuzz" - packages = ["."] - revision = "24818f796faf91cd76ec7bddd72458fbced7a6c1" - -[[projects]] - name = "github.com/googleapis/gnostic" - packages = [ - "OpenAPIv2", - "compiler", - "extensions" - ] - revision = "7c663266750e7d82587642f65e60bc4083f1f84e" - version = "v0.2.0" - -[[projects]] - branch = "master" - name = "github.com/gopherjs/gopherjs" - packages = ["js"] - revision = "d547d1d9531ed93dbdebcbff7f83e7c876a1e0ee" - -[[projects]] - name = "github.com/hashicorp/golang-lru" - packages = [ - ".", - "simplelru" - ] - revision = "20f1fb78b0740ba8c3cb143a61e86ba5c8669768" - version = "v0.5.0" - -[[projects]] - branch = "master" - name = "github.com/howeyc/gopass" - packages = ["."] - revision = "bf9dde6d0d2c004a008c27aaee91170c786f6db8" - -[[projects]] - name = "github.com/imdario/mergo" - packages = ["."] - revision = "9f23e2d6bd2a77f959b2bf6acdbefd708a83a4a4" - version = "v0.3.6" - -[[projects]] - branch = "master" - name = "github.com/joncalhoun/qson" - packages = ["."] - revision = "8a9cab3a62b1b693e7dfa590a215dc6217552803" - -[[projects]] - name = "github.com/json-iterator/go" - packages = ["."] - revision = "1624edc4454b8682399def8740d46db5e4362ba4" - version = "v1.1.5" - -[[projects]] - name = "github.com/jtolds/gls" - packages = ["."] - revision = "b4936e06046bbecbb94cae9c18127ebe510a2cb9" - version = "v4.20" - -[[projects]] - name = "github.com/konsorten/go-windows-terminal-sequences" - packages = ["."] - revision = "5c8c8bd35d3832f5d134ae1e1e375b69a4d25242" - version = "v1.0.1" - -[[projects]] - branch = "master" - name = "github.com/mailru/easyjson" - packages = [ - "buffer", - "jlexer", - "jwriter" - ] - revision = "60711f1a8329503b04e1c88535f419d0bb440bff" - -[[projects]] - name = "github.com/minio/minio-go" - packages = [ - ".", - "pkg/credentials", - "pkg/encrypt", - "pkg/s3signer", - "pkg/s3utils", - "pkg/set" - ] - revision = "e6694bcc4a6b0c1756797be85b8458635a65924e" - version = "v6.0.13" - -[[projects]] - name = "github.com/mitchellh/go-homedir" - packages = ["."] - revision = "ae18d6b8b3205b561c79e8e5f69bff09736185f4" - version = "v1.0.0" - -[[projects]] - name = "github.com/modern-go/concurrent" - packages = ["."] - revision = "bacd9c7ef1dd9b15be4a9909b8ac7a4e313eec94" - version = "1.0.3" - -[[projects]] - name = "github.com/modern-go/reflect2" - packages = ["."] - revision = "4b7aa43c6742a2c18fdef89dd197aaae7dac7ccd" - version = "1.0.1" - -[[projects]] - name = "github.com/nats-io/go-nats" - packages = [ - ".", - "encoders/builtin", - "util" - ] - revision = "13c7fc7590db68b18f2015600f8765a02d705b5d" - version = "v1.7.0" - -[[projects]] - branch = "master" - name = "github.com/nats-io/go-nats-streaming" - packages = [ - ".", - "pb" - ] - revision = "a0e3aee6fce1a77efe4024df3280416e9d99bb98" - -[[projects]] - name = "github.com/nats-io/nkeys" - packages = ["."] - revision = "1546a3320a8f195a5b5c84aef8309377c2e411d5" - version = "v0.0.2" - -[[projects]] - name = "github.com/nats-io/nuid" - packages = ["."] - revision = "289cccf02c178dc782430d534e3c1f5b72af807f" - version = "v1.0.0" - -[[projects]] - name = "github.com/pierrec/lz4" - packages = [ - ".", - "internal/xxh32" - ] - revision = "635575b42742856941dbc767b44905bb9ba083f6" - version = "v2.0.7" - -[[projects]] - name = "github.com/pmezard/go-difflib" - packages = ["difflib"] - revision = "792786c7400a136282c1664665ae0a8db921c6c2" - version = "v1.0.0" - -[[projects]] - branch = "master" - name = "github.com/rcrowley/go-metrics" - packages = ["."] - revision = "3113b8401b8a98917cde58f8bbd42a1b1c03b1fd" - -[[projects]] - name = "github.com/robfig/cron" - packages = ["."] - revision = "b41be1df696709bb6395fe435af20370037c0b4c" - version = "v1.1" - -[[projects]] - name = "github.com/rs/zerolog" - packages = [ - ".", - "internal/cbor", - "internal/json" - ] - revision = "8747b7b3a51b5d08ee7ac50eaf4869edaf9f714a" - version = "v1.11.0" - -[[projects]] - name = "github.com/satori/go.uuid" - packages = ["."] - revision = "f58768cc1a7a7e77a3bd49e98cdd21419399b6a3" - version = "v1.2.0" - -[[projects]] - name = "github.com/sirupsen/logrus" - packages = ["."] - revision = "e1e72e9de974bd926e5c56f83753fba2df402ce5" - version = "v1.3.0" - -[[projects]] - name = "github.com/smartystreets/assertions" - packages = [ - ".", - "internal/go-render/render", - "internal/oglematchers" - ] - revision = "7678a5452ebea5b7090a6b163f844c133f523da2" - version = "1.8.3" - -[[projects]] - name = "github.com/smartystreets/goconvey" - packages = [ - "convey", - "convey/gotest", - "convey/reporting" - ] - revision = "9e8dc3f972df6c8fcc0375ef492c24d0bb204857" - version = "1.6.3" - -[[projects]] - name = "github.com/spf13/pflag" - packages = ["."] - revision = "298182f68c66c05229eb03ac171abe6e309ee79a" - version = "v1.0.3" - -[[projects]] - branch = "master" - name = "github.com/streadway/amqp" - packages = ["."] - revision = "a314942b2fd9dde7a3f70ba3f1062848ce6eb392" - -[[projects]] - name = "github.com/stretchr/testify" - packages = ["assert"] - revision = "ffdc059bfe9ce6a4e144ba849dbedead332c6053" - version = "v1.3.0" - -[[projects]] - name = "github.com/tidwall/gjson" - packages = ["."] - revision = "5a96cfda705e1762dc0671e26b0b78925ad97e29" - version = "v1.1.5" - -[[projects]] - name = "github.com/tidwall/match" - packages = ["."] - revision = "33827db735fff6510490d69a8622612558a557ed" - version = "v1.0.1" - -[[projects]] - name = "github.com/tidwall/sjson" - packages = ["."] - revision = "c943cc8c8d751d9b33444adf78ae04c2fc8be754" - version = "v1.0.3" - -[[projects]] - branch = "master" - name = "github.com/xanzy/go-gitlab" - packages = ["."] - revision = "d85a1530126065c71277db28196ec196daafc9dc" - -[[projects]] - branch = "master" - name = "golang.org/x/crypto" - packages = [ - "argon2", - "blake2b", - "ed25519", - "ed25519/internal/edwards25519", - "ssh/terminal" - ] - revision = "64072686203f69e3fd20143576b27200f18ab0fa" - -[[projects]] - branch = "master" - name = "golang.org/x/net" - packages = [ - "context", - "context/ctxhttp", - "http/httpguts", - "http2", - "http2/hpack", - "idna", - "internal/socks", - "internal/timeseries", - "proxy", - "publicsuffix", - "trace", - "websocket" - ] - revision = "ed066c81e75eba56dd9bd2139ade88125b855585" - -[[projects]] - branch = "master" - name = "golang.org/x/oauth2" - packages = [ - ".", - "internal" - ] - revision = "5dab4167f31cbd76b407f1486c86b40748bc5073" - -[[projects]] - branch = "master" - name = "golang.org/x/sys" - packages = [ - "cpu", - "unix", - "windows" - ] - revision = "054c452bb702e465e95ce8e7a3d9a6cf0cd1188d" - -[[projects]] - name = "golang.org/x/text" - packages = [ - "collate", - "collate/build", - "internal/colltab", - "internal/gen", - "internal/tag", - "internal/triegen", - "internal/ucd", - "language", - "secure/bidirule", - "transform", - "unicode/bidi", - "unicode/cldr", - "unicode/norm", - "unicode/rangetable", - "width" - ] - revision = "f21a4dfb5e38f5895301dc265a8def02365cc3d0" - version = "v0.3.0" - -[[projects]] - branch = "master" - name = "golang.org/x/time" - packages = ["rate"] - revision = "85acf8d2951cb2a3bde7632f9ff273ef0379bcbd" - -[[projects]] - branch = "master" - name = "golang.org/x/tools" - packages = [ - "go/ast/astutil", - "go/gcexportdata", - "go/internal/cgo", - "go/internal/gcimporter", - "go/internal/packagesdriver", - "go/packages", - "go/types/typeutil", - "imports", - "internal/fastwalk", - "internal/gopathwalk", - "internal/semver" - ] - revision = "24cd39ecf74570612483b772d45cf9d53d908340" - -[[projects]] - name = "google.golang.org/appengine" - packages = [ - "internal", - "internal/base", - "internal/datastore", - "internal/log", - "internal/remote_api", - "internal/urlfetch", - "urlfetch" - ] - revision = "e9657d882bb81064595ca3b56cbe2546bbabf7b1" - version = "v1.4.0" - -[[projects]] - branch = "master" - name = "google.golang.org/genproto" - packages = ["googleapis/rpc/status"] - revision = "db91494dd46c1fdcbbde05e5ff5eb56df8f7d79a" - -[[projects]] - name = "google.golang.org/grpc" - packages = [ - ".", - "balancer", - "balancer/base", - "balancer/roundrobin", - "binarylog/grpc_binarylog_v1", - "codes", - "connectivity", - "credentials", - "credentials/internal", - "encoding", - "encoding/proto", - "grpclog", - "internal", - "internal/backoff", - "internal/binarylog", - "internal/channelz", - "internal/envconfig", - "internal/grpcrand", - "internal/grpcsync", - "internal/syscall", - "internal/transport", - "keepalive", - "metadata", - "naming", - "peer", - "resolver", - "resolver/dns", - "resolver/passthrough", - "stats", - "status", - "tap" - ] - revision = "a02b0774206b209466313a0b525d2c738fe407eb" - version = "v1.18.0" - -[[projects]] - name = "gopkg.in/inf.v0" - packages = ["."] - revision = "d2d2541c53f18d2a059457998ce2876cc8e67cbf" - version = "v0.9.1" - -[[projects]] - name = "gopkg.in/yaml.v2" - packages = ["."] - revision = "51d6538a90f86fe93ac480b35f37b2be17fef232" - version = "v2.2.2" - -[[projects]] - branch = "release-1.10" - name = "k8s.io/api" - packages = [ - "admissionregistration/v1alpha1", - "admissionregistration/v1beta1", - "apps/v1", - "apps/v1beta1", - "apps/v1beta2", - "authentication/v1", - "authentication/v1beta1", - "authorization/v1", - "authorization/v1beta1", - "autoscaling/v1", - "autoscaling/v2beta1", - "batch/v1", - "batch/v1beta1", - "batch/v2alpha1", - "certificates/v1beta1", - "core/v1", - "events/v1beta1", - "extensions/v1beta1", - "networking/v1", - "policy/v1beta1", - "rbac/v1", - "rbac/v1alpha1", - "rbac/v1beta1", - "scheduling/v1alpha1", - "settings/v1alpha1", - "storage/v1", - "storage/v1alpha1", - "storage/v1beta1" - ] - revision = "c89978d5f86d7427bef2fc7752732c8c60b1d188" - -[[projects]] - branch = "release-1.10" - name = "k8s.io/apimachinery" - packages = [ - "pkg/api/errors", - "pkg/api/meta", - "pkg/api/resource", - "pkg/apis/meta/internalversion", - "pkg/apis/meta/v1", - "pkg/apis/meta/v1/unstructured", - "pkg/apis/meta/v1beta1", - "pkg/conversion", - "pkg/conversion/queryparams", - "pkg/fields", - "pkg/labels", - "pkg/runtime", - "pkg/runtime/schema", - "pkg/runtime/serializer", - "pkg/runtime/serializer/json", - "pkg/runtime/serializer/protobuf", - "pkg/runtime/serializer/recognizer", - "pkg/runtime/serializer/streaming", - "pkg/runtime/serializer/versioning", - "pkg/selection", - "pkg/types", - "pkg/util/cache", - "pkg/util/clock", - "pkg/util/diff", - "pkg/util/errors", - "pkg/util/framer", - "pkg/util/intstr", - "pkg/util/json", - "pkg/util/net", - "pkg/util/runtime", - "pkg/util/sets", - "pkg/util/validation", - "pkg/util/validation/field", - "pkg/util/wait", - "pkg/util/yaml", - "pkg/version", - "pkg/watch", - "third_party/forked/golang/reflect" - ] - revision = "d49e237a2683fa6dc43a86c7b1b766e0219fb6e7" - -[[projects]] - branch = "release-7.0" - name = "k8s.io/client-go" - packages = [ - "discovery", - "discovery/fake", - "dynamic", - "kubernetes", - "kubernetes/fake", - "kubernetes/scheme", - "kubernetes/typed/admissionregistration/v1alpha1", - "kubernetes/typed/admissionregistration/v1alpha1/fake", - "kubernetes/typed/admissionregistration/v1beta1", - "kubernetes/typed/admissionregistration/v1beta1/fake", - "kubernetes/typed/apps/v1", - "kubernetes/typed/apps/v1/fake", - "kubernetes/typed/apps/v1beta1", - "kubernetes/typed/apps/v1beta1/fake", - "kubernetes/typed/apps/v1beta2", - "kubernetes/typed/apps/v1beta2/fake", - "kubernetes/typed/authentication/v1", - "kubernetes/typed/authentication/v1/fake", - "kubernetes/typed/authentication/v1beta1", - "kubernetes/typed/authentication/v1beta1/fake", - "kubernetes/typed/authorization/v1", - "kubernetes/typed/authorization/v1/fake", - "kubernetes/typed/authorization/v1beta1", - "kubernetes/typed/authorization/v1beta1/fake", - "kubernetes/typed/autoscaling/v1", - "kubernetes/typed/autoscaling/v1/fake", - "kubernetes/typed/autoscaling/v2beta1", - "kubernetes/typed/autoscaling/v2beta1/fake", - "kubernetes/typed/batch/v1", - "kubernetes/typed/batch/v1/fake", - "kubernetes/typed/batch/v1beta1", - "kubernetes/typed/batch/v1beta1/fake", - "kubernetes/typed/batch/v2alpha1", - "kubernetes/typed/batch/v2alpha1/fake", - "kubernetes/typed/certificates/v1beta1", - "kubernetes/typed/certificates/v1beta1/fake", - "kubernetes/typed/core/v1", - "kubernetes/typed/core/v1/fake", - "kubernetes/typed/events/v1beta1", - "kubernetes/typed/events/v1beta1/fake", - "kubernetes/typed/extensions/v1beta1", - "kubernetes/typed/extensions/v1beta1/fake", - "kubernetes/typed/networking/v1", - "kubernetes/typed/networking/v1/fake", - "kubernetes/typed/policy/v1beta1", - "kubernetes/typed/policy/v1beta1/fake", - "kubernetes/typed/rbac/v1", - "kubernetes/typed/rbac/v1/fake", - "kubernetes/typed/rbac/v1alpha1", - "kubernetes/typed/rbac/v1alpha1/fake", - "kubernetes/typed/rbac/v1beta1", - "kubernetes/typed/rbac/v1beta1/fake", - "kubernetes/typed/scheduling/v1alpha1", - "kubernetes/typed/scheduling/v1alpha1/fake", - "kubernetes/typed/settings/v1alpha1", - "kubernetes/typed/settings/v1alpha1/fake", - "kubernetes/typed/storage/v1", - "kubernetes/typed/storage/v1/fake", - "kubernetes/typed/storage/v1alpha1", - "kubernetes/typed/storage/v1alpha1/fake", - "kubernetes/typed/storage/v1beta1", - "kubernetes/typed/storage/v1beta1/fake", - "pkg/apis/clientauthentication", - "pkg/apis/clientauthentication/v1alpha1", - "pkg/version", - "plugin/pkg/client/auth/exec", - "rest", - "rest/watch", - "testing", - "tools/auth", - "tools/cache", - "tools/clientcmd", - "tools/clientcmd/api", - "tools/clientcmd/api/latest", - "tools/clientcmd/api/v1", - "tools/metrics", - "tools/pager", - "tools/reference", - "transport", - "util/buffer", - "util/cert", - "util/flowcontrol", - "util/homedir", - "util/integer", - "util/retry", - "util/workqueue" - ] - revision = "36368dede29baa5ecd253416d70ddc0c76bde69b" - -[[projects]] - branch = "release-1.10" - name = "k8s.io/code-generator" - packages = [ - "cmd/client-gen", - "cmd/client-gen/args", - "cmd/client-gen/generators", - "cmd/client-gen/generators/fake", - "cmd/client-gen/generators/scheme", - "cmd/client-gen/generators/util", - "cmd/client-gen/path", - "cmd/client-gen/types", - "cmd/deepcopy-gen", - "cmd/deepcopy-gen/args", - "cmd/defaulter-gen", - "cmd/defaulter-gen/args", - "cmd/go-to-protobuf", - "cmd/go-to-protobuf/protobuf", - "cmd/go-to-protobuf/protoc-gen-gogo", - "cmd/informer-gen", - "cmd/informer-gen/args", - "cmd/informer-gen/generators", - "cmd/lister-gen", - "cmd/lister-gen/args", - "cmd/lister-gen/generators", - "cmd/openapi-gen", - "cmd/openapi-gen/args", - "pkg/util", - "third_party/forked/golang/reflect" - ] - revision = "edc41f23fa918716df540b1486477d62237010e4" - -[[projects]] - branch = "master" - name = "k8s.io/gengo" - packages = [ - "args", - "examples/deepcopy-gen/generators", - "examples/defaulter-gen/generators", - "examples/set-gen/sets", - "generator", - "namer", - "parser", - "types" - ] - revision = "f8a0810f38afb8478882b3835a615aebfda39afa" - -[[projects]] - name = "k8s.io/klog" - packages = ["."] - revision = "a5bc97fbc634d635061f3146511332c7e313a55a" - version = "v0.1.0" - -[[projects]] - branch = "master" - name = "k8s.io/kube-openapi" - packages = [ - "cmd/openapi-gen/args", - "pkg/common", - "pkg/generators", - "pkg/generators/rules", - "pkg/util/sets" - ] - revision = "ced9eb3070a5f1c548ef46e8dfe2a97c208d9f03" - -[solve-meta] - analyzer-name = "dep" - analyzer-version = 1 - inputs-digest = "28bc456cb7b54760f5cc30572c5b3bdb1ded4ca0cf62c7968f8b1236c0f75172" - solver-name = "gps-cdcl" - solver-version = 1 diff --git a/Gopkg.toml b/Gopkg.toml index 81fbb362a3..8f415f8cc0 100644 --- a/Gopkg.toml +++ b/Gopkg.toml @@ -73,7 +73,7 @@ required = [ branch = "master" [[constraint]] - name = "github.com/xanzy/go-gitlab" + name = "github.com/Knetic/govaluate" branch = "master" [[override]] diff --git a/controllers/gateway/validate_test.go b/controllers/gateway/validate_test.go index a41727b24b..85843b0dc3 100644 --- a/controllers/gateway/validate_test.go +++ b/controllers/gateway/validate_test.go @@ -17,21 +17,33 @@ limitations under the License. package gateway import ( + "fmt" + "github.com/argoproj/argo-events/pkg/apis/gateway/v1alpha1" + "github.com/ghodss/yaml" + "io/ioutil" + "strings" "testing" "github.com/smartystreets/goconvey/convey" ) func TestValidate(t *testing.T) { - convey.Convey("Given a gateway", t, func() { - gateway, err := getGateway() - - convey.Convey("Make sure gateway is a valid gateway", func() { + dir := "../../examples/gateways" + convey.Convey("Validate list of gateways", t, func() { + files, err := ioutil.ReadDir(dir) + convey.So(err, convey.ShouldBeNil) + for _, file := range files { + if strings.HasSuffix(file.Name(), "configmap.yaml") { + continue + } + fmt.Println("filename: ", file.Name()) + content, err := ioutil.ReadFile(fmt.Sprintf("%s/%s", dir, file.Name())) convey.So(err, convey.ShouldBeNil) - convey.So(gateway, convey.ShouldNotBeNil) - - err := Validate(gateway) + var gateway *v1alpha1.Gateway + err = yaml.Unmarshal([]byte(content), &gateway) + convey.So(err, convey.ShouldBeNil) + err = Validate(gateway) convey.So(err, convey.ShouldBeNil) - }) + } }) } diff --git a/controllers/sensor/operator.go b/controllers/sensor/operator.go index 63cac3888e..f6b111ec8e 100644 --- a/controllers/sensor/operator.go +++ b/controllers/sensor/operator.go @@ -102,8 +102,15 @@ func (soc *sOperationCtx) operate() error { } // Initialize all event dependency nodes - for _, eventDependency := range soc.s.Spec.Dependencies { - InitializeNode(soc.s, eventDependency.Name, v1alpha1.NodeTypeEventDependency, &soc.log) + for _, dependency := range soc.s.Spec.Dependencies { + InitializeNode(soc.s, dependency.Name, v1alpha1.NodeTypeEventDependency, &soc.log) + } + + // Initialize all dependency groups + if soc.s.Spec.DependencyGroups != nil { + for _, group := range soc.s.Spec.DependencyGroups { + InitializeNode(soc.s, group.Name, v1alpha1.NodeTypeDependencyGroup, &soc.log) + } } // Initialize all trigger nodes @@ -182,9 +189,16 @@ func (soc *sOperationCtx) operate() error { } } - // Mark all eventDependency nodes as active - for _, eventDependency := range soc.s.Spec.Dependencies { - MarkNodePhase(soc.s, eventDependency.Name, v1alpha1.NodeTypeEventDependency, v1alpha1.NodePhaseActive, nil, &soc.log, "node is active") + // Mark all event dependency nodes as active + for _, dependency := range soc.s.Spec.Dependencies { + MarkNodePhase(soc.s, dependency.Name, v1alpha1.NodeTypeEventDependency, v1alpha1.NodePhaseActive, nil, &soc.log, "node is active") + } + + // Mark all dependency groups as active + if soc.s.Spec.DependencyGroups != nil { + for _, group := range soc.s.Spec.DependencyGroups { + MarkNodePhase(soc.s, group.Name, v1alpha1.NodeTypeDependencyGroup, v1alpha1.NodePhaseActive, nil, &soc.log, "node is active") + } } // if we get here - we know the signals are running diff --git a/controllers/sensor/operator_test.go b/controllers/sensor/operator_test.go index 2d322f7a7b..368998d33d 100644 --- a/controllers/sensor/operator_test.go +++ b/controllers/sensor/operator_test.go @@ -107,6 +107,8 @@ func TestSensorOperations(t *testing.T) { switch node.Type { case v1alpha1.NodeTypeEventDependency: convey.So(node.Phase, convey.ShouldEqual, v1alpha1.NodePhaseActive) + case v1alpha1.NodeTypeDependencyGroup: + convey.So(node.Phase, convey.ShouldEqual, v1alpha1.NodePhaseActive) case v1alpha1.NodeTypeTrigger: convey.So(node.Phase, convey.ShouldEqual, v1alpha1.NodePhaseNew) } diff --git a/controllers/sensor/validate.go b/controllers/sensor/validate.go index c0d1293ec5..d31824b9c2 100644 --- a/controllers/sensor/validate.go +++ b/controllers/sensor/validate.go @@ -18,6 +18,7 @@ package sensor import ( "fmt" + "github.com/Knetic/govaluate" "time" "github.com/argoproj/argo-events/common" @@ -61,6 +62,25 @@ func ValidateSensor(s *v1alpha1.Sensor) error { default: return fmt.Errorf("unknown gateway type") } + + if s.Spec.DependencyGroups != nil { + if s.Spec.Circuit == "" { + return fmt.Errorf("no circuit expression provided to resolve dependency groups") + } + expression, err := govaluate.NewEvaluableExpression(s.Spec.Circuit) + if err != nil { + return fmt.Errorf("circuit expression can't be created for dependency groups. err: %+v", err) + } + + groups := make(map[string]interface{}, len(s.Spec.DependencyGroups)) + for _, group := range s.Spec.DependencyGroups { + groups[group.Name] = false + } + if _, err = expression.Evaluate(groups); err != nil { + return fmt.Errorf("circuit expression can't be evaluated for dependency groups. err: %+v", err) + } + } + return nil } @@ -77,6 +97,9 @@ func validateTriggers(triggers []v1alpha1.Trigger) error { if trigger.Resource == nil { return fmt.Errorf("trigger '%s' does not contain an absolute action", trigger.Name) } + if trigger.When != nil && trigger.When.All != nil && trigger.When.Any != nil { + return fmt.Errorf("trigger condition can't have both any and all condition") + } } return nil } diff --git a/controllers/sensor/validate_test.go b/controllers/sensor/validate_test.go index 948fd0f3ae..55ae563275 100644 --- a/controllers/sensor/validate_test.go +++ b/controllers/sensor/validate_test.go @@ -17,18 +17,29 @@ limitations under the License. package sensor import ( + "fmt" + "github.com/argoproj/argo-events/pkg/apis/sensor/v1alpha1" + "github.com/ghodss/yaml" + "io/ioutil" "testing" "github.com/smartystreets/goconvey/convey" ) func TestValidateSensor(t *testing.T) { - convey.Convey("Given a sensor", t, func() { - sensor, err := getSensor() + dir := "../../examples/sensors" + convey.Convey("Validate list of sensor", t, func() { + files, err := ioutil.ReadDir(dir) convey.So(err, convey.ShouldBeNil) - convey.Convey("Validate", func() { - err := ValidateSensor(sensor) + for _, file := range files { + fmt.Println("filename: ", file.Name()) + content, err := ioutil.ReadFile(fmt.Sprintf("%s/%s", dir, file.Name())) convey.So(err, convey.ShouldBeNil) - }) + var sensor *v1alpha1.Sensor + err = yaml.Unmarshal([]byte(content), &sensor) + convey.So(err, convey.ShouldBeNil) + err = ValidateSensor(sensor) + convey.So(err, convey.ShouldBeNil) + } }) } diff --git a/examples/sensors/context-filter-webhook.yaml b/examples/sensors/context-filter-webhook.yaml index 60d107298f..cce8fa3748 100644 --- a/examples/sensors/context-filter-webhook.yaml +++ b/examples/sensors/context-filter-webhook.yaml @@ -31,8 +31,9 @@ spec: kind: Workflow source: s3: - bucket: workflows - key: hello-world.yaml + bucket: + name: workflows + key: hello-world.yaml endpoint: minio-service.argo-events:9000 insecure: true accessKey: diff --git a/examples/sensors/data-filter-webhook.yaml b/examples/sensors/data-filter-webhook.yaml index 613e0b1abf..4691b11c58 100644 --- a/examples/sensors/data-filter-webhook.yaml +++ b/examples/sensors/data-filter-webhook.yaml @@ -15,10 +15,12 @@ spec: dependencies: - name: "webhook-gateway:foo" filters: + name: "data-filter" data: - - path: bucket - type: string - value: argo-workflow-input + dataFilters: + - path: bucket + type: string + value: argo-workflow-input eventProtocol: type: "HTTP" http: @@ -32,8 +34,9 @@ spec: kind: Workflow source: s3: - bucket: workflows - key: hello-world.yaml + bucket: + name: workflows + key: hello-world.yaml endpoint: minio-service.argo-events:9000 insecure: true accessKey: diff --git a/examples/sensors/webhook-http-dependency-groups.yaml b/examples/sensors/webhook-http-dependency-groups.yaml new file mode 100644 index 0000000000..98dd2900cf --- /dev/null +++ b/examples/sensors/webhook-http-dependency-groups.yaml @@ -0,0 +1,138 @@ +# The dependency grouping and selective workflow trigger execution is not supported in latest release +# This feature will be released in next release v0.8. +# You can try this example with sensor and sensor controller image v0.7.1 +apiVersion: argoproj.io/v1alpha1 +kind: Sensor +metadata: + name: webhook-sensor-http + labels: + sensors.argoproj.io/sensor-controller-instanceid: argo-events +spec: + deploySpec: + containers: + - name: "sensor" + image: "argoproj/sensor:v0.7.1" + imagePullPolicy: Always + serviceAccountName: argo-events-sa + dependencies: + - name: "webhook-gateway-http:endpoint1" + filters: + context: + source: + host: xyz.com + contentType: application/json + - name: "webhook-gateway-http:endpoint2" + - name: "webhook-gateway-http:endpoint3" + - name: "webhook-gateway-http:endpoint4" + - name: "webhook-gateway-http:endpoint5" + - name: "webhook-gateway-http:endpoint6" + - name: "webhook-gateway-http:endpoint7" + filters: + name: "data-filter" + data: + dataFilters: + - path: bucket + type: string + value: argo-workflow-input + - name: "webhook-gateway-http:endpoint8" + - name: "webhook-gateway-http:endpoint9" + dependencyGroups: + - name: "group_1" + dependencies: + - "webhook-gateway-http:endpoint1" + - "webhook-gateway-http:endpoint2" + - name: "group_2" + dependencies: + - "webhook-gateway-http:endpoint3" + - name: "group_3" + dependencies: + - "webhook-gateway-http:endpoint4" + - "webhook-gateway-http:endpoint5" + - name: "group_4" + dependencies: + - "webhook-gateway-http:endpoint6" + - "webhook-gateway-http:endpoint7" + - "webhook-gateway-http:endpoint8" + - name: "group_5" + dependencies: + - "webhook-gateway-http:endpoint9" + circuit: "group_1 || group_2 || ((group_3 || group_4) && group_5)" + eventProtocol: + type: "HTTP" + http: + port: "9300" + triggers: + - name: webhook-workflow-trigger + when: + any: + - "group_1" + - "group_2" + resource: + namespace: argo-events + group: argoproj.io + version: v1alpha1 + kind: Workflow + source: + inline: | + apiVersion: argoproj.io/v1alpha1 + kind: Workflow + metadata: + generateName: hello-world- + spec: + entrypoint: whalesay + templates: + - name: whalesay + container: + args: + - "hello world" + command: + - cowsay + image: "docker/whalesay:latest" + - name: webhook-workflow-trigger-2 + when: + all: + - "group_5" + - "group_4" + resource: + namespace: argo-events + group: argoproj.io + version: v1alpha1 + kind: Workflow + source: + inline: | + apiVersion: argoproj.io/v1alpha1 + kind: Workflow + metadata: + generateName: hello-world-2- + spec: + entrypoint: whalesay + templates: + - name: whalesay + container: + args: + - "hello world" + command: + - cowsay + image: "docker/whalesay:latest" + - name: webhook-workflow-trigger-common + resource: + namespace: argo-events + group: argoproj.io + version: v1alpha1 + kind: Workflow + source: + inline: | + apiVersion: argoproj.io/v1alpha1 + kind: Workflow + metadata: + generateName: hello-world-common- + spec: + entrypoint: whalesay + templates: + - name: whalesay + container: + args: + - "hello world" + command: + - cowsay + image: "docker/whalesay:latest" diff --git a/examples/sensors/webhook-http.yaml b/examples/sensors/webhook-http.yaml index 78db19e201..c0116176ed 100644 --- a/examples/sensors/webhook-http.yaml +++ b/examples/sensors/webhook-http.yaml @@ -39,4 +39,4 @@ spec: - "hello world" command: - cowsay - image: "docker/whalesay:latest" + image: "docker/whalesay:latest" \ No newline at end of file diff --git a/examples/sensors/webhook-with-complete-payload.yaml b/examples/sensors/webhook-with-complete-payload.yaml index 36dc62691b..683a0a87cc 100644 --- a/examples/sensors/webhook-with-complete-payload.yaml +++ b/examples/sensors/webhook-with-complete-payload.yaml @@ -1,7 +1,7 @@ apiVersion: argoproj.io/v1alpha1 kind: Sensor metadata: - name: webhook-with-resource-param-sensor + name: webhook-with-complete-payload-sensor labels: sensors.argoproj.io/sensor-controller-instanceid: argo-events spec: diff --git a/pkg/apis/common/generated.pb.go b/pkg/apis/common/generated.pb.go index a8916c7b53..5ac96b2433 100644 --- a/pkg/apis/common/generated.pb.go +++ b/pkg/apis/common/generated.pb.go @@ -46,7 +46,7 @@ const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package func (m *Event) Reset() { *m = Event{} } func (*Event) ProtoMessage() {} func (*Event) Descriptor() ([]byte, []int) { - return fileDescriptor_generated_1ecb42411ad60761, []int{0} + return fileDescriptor_generated_fe300a967e896a62, []int{0} } func (m *Event) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -74,7 +74,7 @@ var xxx_messageInfo_Event proto.InternalMessageInfo func (m *EventContext) Reset() { *m = EventContext{} } func (*EventContext) ProtoMessage() {} func (*EventContext) Descriptor() ([]byte, []int) { - return fileDescriptor_generated_1ecb42411ad60761, []int{1} + return fileDescriptor_generated_fe300a967e896a62, []int{1} } func (m *EventContext) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -102,7 +102,7 @@ var xxx_messageInfo_EventContext proto.InternalMessageInfo func (m *EventProtocol) Reset() { *m = EventProtocol{} } func (*EventProtocol) ProtoMessage() {} func (*EventProtocol) Descriptor() ([]byte, []int) { - return fileDescriptor_generated_1ecb42411ad60761, []int{2} + return fileDescriptor_generated_fe300a967e896a62, []int{2} } func (m *EventProtocol) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -130,7 +130,7 @@ var xxx_messageInfo_EventProtocol proto.InternalMessageInfo func (m *Http) Reset() { *m = Http{} } func (*Http) ProtoMessage() {} func (*Http) Descriptor() ([]byte, []int) { - return fileDescriptor_generated_1ecb42411ad60761, []int{3} + return fileDescriptor_generated_fe300a967e896a62, []int{3} } func (m *Http) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -158,7 +158,7 @@ var xxx_messageInfo_Http proto.InternalMessageInfo func (m *Nats) Reset() { *m = Nats{} } func (*Nats) ProtoMessage() {} func (*Nats) Descriptor() ([]byte, []int) { - return fileDescriptor_generated_1ecb42411ad60761, []int{4} + return fileDescriptor_generated_fe300a967e896a62, []int{4} } func (m *Nats) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -186,7 +186,7 @@ var xxx_messageInfo_Nats proto.InternalMessageInfo func (m *S3Artifact) Reset() { *m = S3Artifact{} } func (*S3Artifact) ProtoMessage() {} func (*S3Artifact) Descriptor() ([]byte, []int) { - return fileDescriptor_generated_1ecb42411ad60761, []int{5} + return fileDescriptor_generated_fe300a967e896a62, []int{5} } func (m *S3Artifact) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -214,7 +214,7 @@ var xxx_messageInfo_S3Artifact proto.InternalMessageInfo func (m *S3Bucket) Reset() { *m = S3Bucket{} } func (*S3Bucket) ProtoMessage() {} func (*S3Bucket) Descriptor() ([]byte, []int) { - return fileDescriptor_generated_1ecb42411ad60761, []int{6} + return fileDescriptor_generated_fe300a967e896a62, []int{6} } func (m *S3Bucket) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -242,7 +242,7 @@ var xxx_messageInfo_S3Bucket proto.InternalMessageInfo func (m *S3Filter) Reset() { *m = S3Filter{} } func (*S3Filter) ProtoMessage() {} func (*S3Filter) Descriptor() ([]byte, []int) { - return fileDescriptor_generated_1ecb42411ad60761, []int{7} + return fileDescriptor_generated_fe300a967e896a62, []int{7} } func (m *S3Filter) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -270,7 +270,7 @@ var xxx_messageInfo_S3Filter proto.InternalMessageInfo func (m *URI) Reset() { *m = URI{} } func (*URI) ProtoMessage() {} func (*URI) Descriptor() ([]byte, []int) { - return fileDescriptor_generated_1ecb42411ad60761, []int{8} + return fileDescriptor_generated_fe300a967e896a62, []int{8} } func (m *URI) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -3022,10 +3022,10 @@ var ( ) func init() { - proto.RegisterFile("github.com/argoproj/argo-events/pkg/apis/common/generated.proto", fileDescriptor_generated_1ecb42411ad60761) + proto.RegisterFile("github.com/argoproj/argo-events/pkg/apis/common/generated.proto", fileDescriptor_generated_fe300a967e896a62) } -var fileDescriptor_generated_1ecb42411ad60761 = []byte{ +var fileDescriptor_generated_fe300a967e896a62 = []byte{ // 1309 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x56, 0xcf, 0x6f, 0x1b, 0xc5, 0x17, 0x8f, 0x13, 0xdb, 0xb1, 0xc7, 0xed, 0x37, 0xe9, 0xf4, 0x5b, 0x61, 0x05, 0xd5, 0x09, 0x46, diff --git a/pkg/apis/gateway/v1alpha1/generated.pb.go b/pkg/apis/gateway/v1alpha1/generated.pb.go index 2d8ba2bcf3..a14fedd9a5 100644 --- a/pkg/apis/gateway/v1alpha1/generated.pb.go +++ b/pkg/apis/gateway/v1alpha1/generated.pb.go @@ -45,7 +45,7 @@ const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package func (m *Gateway) Reset() { *m = Gateway{} } func (*Gateway) ProtoMessage() {} func (*Gateway) Descriptor() ([]byte, []int) { - return fileDescriptor_generated_d61eb949e4c0f5b3, []int{0} + return fileDescriptor_generated_d7e7992cb16da963, []int{0} } func (m *Gateway) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -73,7 +73,7 @@ var xxx_messageInfo_Gateway proto.InternalMessageInfo func (m *GatewayList) Reset() { *m = GatewayList{} } func (*GatewayList) ProtoMessage() {} func (*GatewayList) Descriptor() ([]byte, []int) { - return fileDescriptor_generated_d61eb949e4c0f5b3, []int{1} + return fileDescriptor_generated_d7e7992cb16da963, []int{1} } func (m *GatewayList) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -101,7 +101,7 @@ var xxx_messageInfo_GatewayList proto.InternalMessageInfo func (m *GatewayNotificationWatcher) Reset() { *m = GatewayNotificationWatcher{} } func (*GatewayNotificationWatcher) ProtoMessage() {} func (*GatewayNotificationWatcher) Descriptor() ([]byte, []int) { - return fileDescriptor_generated_d61eb949e4c0f5b3, []int{2} + return fileDescriptor_generated_d7e7992cb16da963, []int{2} } func (m *GatewayNotificationWatcher) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -129,7 +129,7 @@ var xxx_messageInfo_GatewayNotificationWatcher proto.InternalMessageInfo func (m *GatewaySpec) Reset() { *m = GatewaySpec{} } func (*GatewaySpec) ProtoMessage() {} func (*GatewaySpec) Descriptor() ([]byte, []int) { - return fileDescriptor_generated_d61eb949e4c0f5b3, []int{3} + return fileDescriptor_generated_d7e7992cb16da963, []int{3} } func (m *GatewaySpec) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -157,7 +157,7 @@ var xxx_messageInfo_GatewaySpec proto.InternalMessageInfo func (m *GatewayStatus) Reset() { *m = GatewayStatus{} } func (*GatewayStatus) ProtoMessage() {} func (*GatewayStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_generated_d61eb949e4c0f5b3, []int{4} + return fileDescriptor_generated_d7e7992cb16da963, []int{4} } func (m *GatewayStatus) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -185,7 +185,7 @@ var xxx_messageInfo_GatewayStatus proto.InternalMessageInfo func (m *NodeStatus) Reset() { *m = NodeStatus{} } func (*NodeStatus) ProtoMessage() {} func (*NodeStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_generated_d61eb949e4c0f5b3, []int{5} + return fileDescriptor_generated_d7e7992cb16da963, []int{5} } func (m *NodeStatus) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -213,7 +213,7 @@ var xxx_messageInfo_NodeStatus proto.InternalMessageInfo func (m *NotificationWatchers) Reset() { *m = NotificationWatchers{} } func (*NotificationWatchers) ProtoMessage() {} func (*NotificationWatchers) Descriptor() ([]byte, []int) { - return fileDescriptor_generated_d61eb949e4c0f5b3, []int{6} + return fileDescriptor_generated_d7e7992cb16da963, []int{6} } func (m *NotificationWatchers) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -241,7 +241,7 @@ var xxx_messageInfo_NotificationWatchers proto.InternalMessageInfo func (m *SensorNotificationWatcher) Reset() { *m = SensorNotificationWatcher{} } func (*SensorNotificationWatcher) ProtoMessage() {} func (*SensorNotificationWatcher) Descriptor() ([]byte, []int) { - return fileDescriptor_generated_d61eb949e4c0f5b3, []int{7} + return fileDescriptor_generated_d7e7992cb16da963, []int{7} } func (m *SensorNotificationWatcher) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2444,10 +2444,10 @@ var ( ) func init() { - proto.RegisterFile("github.com/argoproj/argo-events/pkg/apis/gateway/v1alpha1/generated.proto", fileDescriptor_generated_d61eb949e4c0f5b3) + proto.RegisterFile("github.com/argoproj/argo-events/pkg/apis/gateway/v1alpha1/generated.proto", fileDescriptor_generated_d7e7992cb16da963) } -var fileDescriptor_generated_d61eb949e4c0f5b3 = []byte{ +var fileDescriptor_generated_d7e7992cb16da963 = []byte{ // 1073 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x56, 0x5d, 0x6f, 0x1b, 0x45, 0x17, 0xce, 0xda, 0x71, 0x6c, 0x8f, 0x93, 0x7e, 0xcc, 0xdb, 0x57, 0x2c, 0x46, 0x72, 0x2a, 0x5f, diff --git a/pkg/apis/gateway/v1alpha1/generated.proto b/pkg/apis/gateway/v1alpha1/generated.proto index d1dd11ce20..d82c43d11e 100644 --- a/pkg/apis/gateway/v1alpha1/generated.proto +++ b/pkg/apis/gateway/v1alpha1/generated.proto @@ -20,6 +20,7 @@ syntax = 'proto2'; package github.aaakk.us.kg.argoproj.argo_events.pkg.apis.gateway.v1alpha1; import "github.com/argoproj/argo-events/pkg/apis/common/generated.proto"; +import "github.com/argoproj/argo-events/pkg/apis/sensor/v1alpha1/generated.proto"; import "k8s.io/api/core/v1/generated.proto"; import "k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto"; import "k8s.io/apimachinery/pkg/runtime/generated.proto"; diff --git a/pkg/apis/gateway/v1alpha1/openapi_generated.go b/pkg/apis/gateway/v1alpha1/openapi_generated.go index 026b07b2a6..0bfe83b03f 100644 --- a/pkg/apis/gateway/v1alpha1/openapi_generated.go +++ b/pkg/apis/gateway/v1alpha1/openapi_generated.go @@ -28,52 +28,17 @@ import ( func GetOpenAPIDefinitions(ref common.ReferenceCallback) map[string]common.OpenAPIDefinition { return map[string]common.OpenAPIDefinition{ - "github.com/argoproj/argo-events/pkg/apis/gateway/v1alpha1.EventProtocol": schema_pkg_apis_gateway_v1alpha1_EventProtocol(ref), "github.com/argoproj/argo-events/pkg/apis/gateway/v1alpha1.Gateway": schema_pkg_apis_gateway_v1alpha1_Gateway(ref), "github.com/argoproj/argo-events/pkg/apis/gateway/v1alpha1.GatewayList": schema_pkg_apis_gateway_v1alpha1_GatewayList(ref), "github.com/argoproj/argo-events/pkg/apis/gateway/v1alpha1.GatewayNotificationWatcher": schema_pkg_apis_gateway_v1alpha1_GatewayNotificationWatcher(ref), "github.com/argoproj/argo-events/pkg/apis/gateway/v1alpha1.GatewaySpec": schema_pkg_apis_gateway_v1alpha1_GatewaySpec(ref), "github.com/argoproj/argo-events/pkg/apis/gateway/v1alpha1.GatewayStatus": schema_pkg_apis_gateway_v1alpha1_GatewayStatus(ref), - "github.com/argoproj/argo-events/pkg/apis/gateway/v1alpha1.Http": schema_pkg_apis_gateway_v1alpha1_Http(ref), - "github.com/argoproj/argo-events/pkg/apis/gateway/v1alpha1.Nats": schema_pkg_apis_gateway_v1alpha1_Nats(ref), "github.com/argoproj/argo-events/pkg/apis/gateway/v1alpha1.NodeStatus": schema_pkg_apis_gateway_v1alpha1_NodeStatus(ref), "github.com/argoproj/argo-events/pkg/apis/gateway/v1alpha1.NotificationWatchers": schema_pkg_apis_gateway_v1alpha1_NotificationWatchers(ref), "github.com/argoproj/argo-events/pkg/apis/gateway/v1alpha1.SensorNotificationWatcher": schema_pkg_apis_gateway_v1alpha1_SensorNotificationWatcher(ref), } } -func schema_pkg_apis_gateway_v1alpha1_EventProtocol(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "Dispatch protocol contains configuration necessary to dispatch an event to sensor over different communication protocols", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "type": { - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - "http": { - SchemaProps: spec.SchemaProps{ - Ref: ref("github.com/argoproj/argo-events/pkg/apis/gateway/v1alpha1.Http"), - }, - }, - "nats": { - SchemaProps: spec.SchemaProps{ - Ref: ref("github.com/argoproj/argo-events/pkg/apis/gateway/v1alpha1.Nats"), - }, - }, - }, - Required: []string{"type", "http", "nats"}, - }, - }, - Dependencies: []string{ - "github.com/argoproj/argo-events/pkg/apis/gateway/v1alpha1.Http", "github.com/argoproj/argo-events/pkg/apis/gateway/v1alpha1.Nats"}, - } -} - func schema_pkg_apis_gateway_v1alpha1_Gateway(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ @@ -258,7 +223,7 @@ func schema_pkg_apis_gateway_v1alpha1_GatewaySpec(ref common.ReferenceCallback) "eventProtocol": { SchemaProps: spec.SchemaProps{ Description: "EventProtocol is the underlying protocol used to send events from gateway to watchers(components interested in listening to event from this gateway)", - Ref: ref("github.com/argoproj/argo-events/pkg/apis/gateway/v1alpha1.EventProtocol"), + Ref: ref("github.com/argoproj/argo-events/pkg/apis/common.EventProtocol"), }, }, }, @@ -266,7 +231,7 @@ func schema_pkg_apis_gateway_v1alpha1_GatewaySpec(ref common.ReferenceCallback) }, }, Dependencies: []string{ - "github.com/argoproj/argo-events/pkg/apis/gateway/v1alpha1.EventProtocol", "github.com/argoproj/argo-events/pkg/apis/gateway/v1alpha1.NotificationWatchers", "k8s.io/api/core/v1.Pod", "k8s.io/api/core/v1.Service"}, + "github.com/argoproj/argo-events/pkg/apis/common.EventProtocol", "github.com/argoproj/argo-events/pkg/apis/gateway/v1alpha1.NotificationWatchers", "k8s.io/api/core/v1.Pod", "k8s.io/api/core/v1.Service"}, } } @@ -319,64 +284,6 @@ func schema_pkg_apis_gateway_v1alpha1_GatewayStatus(ref common.ReferenceCallback } } -func schema_pkg_apis_gateway_v1alpha1_Http(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "port": { - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - }, - Required: []string{"port"}, - }, - }, - Dependencies: []string{}, - } -} - -func schema_pkg_apis_gateway_v1alpha1_Nats(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "url": { - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - "type": { - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - "clientId": { - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - "clusterId": { - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - }, - Required: []string{"url", "type"}, - }, - }, - Dependencies: []string{}, - } -} - func schema_pkg_apis_gateway_v1alpha1_NodeStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ diff --git a/pkg/apis/sensor/v1alpha1/generated.pb.go b/pkg/apis/sensor/v1alpha1/generated.pb.go index c7c1c92532..1f82beb1fa 100644 --- a/pkg/apis/sensor/v1alpha1/generated.pb.go +++ b/pkg/apis/sensor/v1alpha1/generated.pb.go @@ -45,7 +45,7 @@ const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package func (m *ArtifactLocation) Reset() { *m = ArtifactLocation{} } func (*ArtifactLocation) ProtoMessage() {} func (*ArtifactLocation) Descriptor() ([]byte, []int) { - return fileDescriptor_generated_d152f1f0b79d4f38, []int{0} + return fileDescriptor_generated_eeefd321c74377c2, []int{0} } func (m *ArtifactLocation) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -73,7 +73,7 @@ var xxx_messageInfo_ArtifactLocation proto.InternalMessageInfo func (m *ConfigmapArtifact) Reset() { *m = ConfigmapArtifact{} } func (*ConfigmapArtifact) ProtoMessage() {} func (*ConfigmapArtifact) Descriptor() ([]byte, []int) { - return fileDescriptor_generated_d152f1f0b79d4f38, []int{1} + return fileDescriptor_generated_eeefd321c74377c2, []int{1} } func (m *ConfigmapArtifact) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -101,7 +101,7 @@ var xxx_messageInfo_ConfigmapArtifact proto.InternalMessageInfo func (m *Data) Reset() { *m = Data{} } func (*Data) ProtoMessage() {} func (*Data) Descriptor() ([]byte, []int) { - return fileDescriptor_generated_d152f1f0b79d4f38, []int{2} + return fileDescriptor_generated_eeefd321c74377c2, []int{2} } func (m *Data) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -129,7 +129,7 @@ var xxx_messageInfo_Data proto.InternalMessageInfo func (m *DataFilter) Reset() { *m = DataFilter{} } func (*DataFilter) ProtoMessage() {} func (*DataFilter) Descriptor() ([]byte, []int) { - return fileDescriptor_generated_d152f1f0b79d4f38, []int{3} + return fileDescriptor_generated_eeefd321c74377c2, []int{3} } func (m *DataFilter) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -154,10 +154,38 @@ func (m *DataFilter) XXX_DiscardUnknown() { var xxx_messageInfo_DataFilter proto.InternalMessageInfo +func (m *DependencyGroup) Reset() { *m = DependencyGroup{} } +func (*DependencyGroup) ProtoMessage() {} +func (*DependencyGroup) Descriptor() ([]byte, []int) { + return fileDescriptor_generated_eeefd321c74377c2, []int{4} +} +func (m *DependencyGroup) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *DependencyGroup) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (dst *DependencyGroup) XXX_Merge(src proto.Message) { + xxx_messageInfo_DependencyGroup.Merge(dst, src) +} +func (m *DependencyGroup) XXX_Size() int { + return m.Size() +} +func (m *DependencyGroup) XXX_DiscardUnknown() { + xxx_messageInfo_DependencyGroup.DiscardUnknown(m) +} + +var xxx_messageInfo_DependencyGroup proto.InternalMessageInfo + func (m *EventDependency) Reset() { *m = EventDependency{} } func (*EventDependency) ProtoMessage() {} func (*EventDependency) Descriptor() ([]byte, []int) { - return fileDescriptor_generated_d152f1f0b79d4f38, []int{4} + return fileDescriptor_generated_eeefd321c74377c2, []int{5} } func (m *EventDependency) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -185,7 +213,7 @@ var xxx_messageInfo_EventDependency proto.InternalMessageInfo func (m *EventDependencyFilter) Reset() { *m = EventDependencyFilter{} } func (*EventDependencyFilter) ProtoMessage() {} func (*EventDependencyFilter) Descriptor() ([]byte, []int) { - return fileDescriptor_generated_d152f1f0b79d4f38, []int{5} + return fileDescriptor_generated_eeefd321c74377c2, []int{6} } func (m *EventDependencyFilter) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -213,7 +241,7 @@ var xxx_messageInfo_EventDependencyFilter proto.InternalMessageInfo func (m *FileArtifact) Reset() { *m = FileArtifact{} } func (*FileArtifact) ProtoMessage() {} func (*FileArtifact) Descriptor() ([]byte, []int) { - return fileDescriptor_generated_d152f1f0b79d4f38, []int{6} + return fileDescriptor_generated_eeefd321c74377c2, []int{7} } func (m *FileArtifact) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -241,7 +269,7 @@ var xxx_messageInfo_FileArtifact proto.InternalMessageInfo func (m *GroupVersionKind) Reset() { *m = GroupVersionKind{} } func (*GroupVersionKind) ProtoMessage() {} func (*GroupVersionKind) Descriptor() ([]byte, []int) { - return fileDescriptor_generated_d152f1f0b79d4f38, []int{7} + return fileDescriptor_generated_eeefd321c74377c2, []int{8} } func (m *GroupVersionKind) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -269,7 +297,7 @@ var xxx_messageInfo_GroupVersionKind proto.InternalMessageInfo func (m *NodeStatus) Reset() { *m = NodeStatus{} } func (*NodeStatus) ProtoMessage() {} func (*NodeStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_generated_d152f1f0b79d4f38, []int{8} + return fileDescriptor_generated_eeefd321c74377c2, []int{9} } func (m *NodeStatus) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -297,7 +325,7 @@ var xxx_messageInfo_NodeStatus proto.InternalMessageInfo func (m *ResourceObject) Reset() { *m = ResourceObject{} } func (*ResourceObject) ProtoMessage() {} func (*ResourceObject) Descriptor() ([]byte, []int) { - return fileDescriptor_generated_d152f1f0b79d4f38, []int{9} + return fileDescriptor_generated_eeefd321c74377c2, []int{10} } func (m *ResourceObject) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -325,7 +353,7 @@ var xxx_messageInfo_ResourceObject proto.InternalMessageInfo func (m *ResourceParameter) Reset() { *m = ResourceParameter{} } func (*ResourceParameter) ProtoMessage() {} func (*ResourceParameter) Descriptor() ([]byte, []int) { - return fileDescriptor_generated_d152f1f0b79d4f38, []int{10} + return fileDescriptor_generated_eeefd321c74377c2, []int{11} } func (m *ResourceParameter) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -353,7 +381,7 @@ var xxx_messageInfo_ResourceParameter proto.InternalMessageInfo func (m *ResourceParameterSource) Reset() { *m = ResourceParameterSource{} } func (*ResourceParameterSource) ProtoMessage() {} func (*ResourceParameterSource) Descriptor() ([]byte, []int) { - return fileDescriptor_generated_d152f1f0b79d4f38, []int{11} + return fileDescriptor_generated_eeefd321c74377c2, []int{12} } func (m *ResourceParameterSource) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -381,7 +409,7 @@ var xxx_messageInfo_ResourceParameterSource proto.InternalMessageInfo func (m *RetryStrategy) Reset() { *m = RetryStrategy{} } func (*RetryStrategy) ProtoMessage() {} func (*RetryStrategy) Descriptor() ([]byte, []int) { - return fileDescriptor_generated_d152f1f0b79d4f38, []int{12} + return fileDescriptor_generated_eeefd321c74377c2, []int{13} } func (m *RetryStrategy) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -409,7 +437,7 @@ var xxx_messageInfo_RetryStrategy proto.InternalMessageInfo func (m *Sensor) Reset() { *m = Sensor{} } func (*Sensor) ProtoMessage() {} func (*Sensor) Descriptor() ([]byte, []int) { - return fileDescriptor_generated_d152f1f0b79d4f38, []int{13} + return fileDescriptor_generated_eeefd321c74377c2, []int{14} } func (m *Sensor) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -437,7 +465,7 @@ var xxx_messageInfo_Sensor proto.InternalMessageInfo func (m *SensorList) Reset() { *m = SensorList{} } func (*SensorList) ProtoMessage() {} func (*SensorList) Descriptor() ([]byte, []int) { - return fileDescriptor_generated_d152f1f0b79d4f38, []int{14} + return fileDescriptor_generated_eeefd321c74377c2, []int{15} } func (m *SensorList) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -465,7 +493,7 @@ var xxx_messageInfo_SensorList proto.InternalMessageInfo func (m *SensorSpec) Reset() { *m = SensorSpec{} } func (*SensorSpec) ProtoMessage() {} func (*SensorSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_generated_d152f1f0b79d4f38, []int{15} + return fileDescriptor_generated_eeefd321c74377c2, []int{16} } func (m *SensorSpec) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -493,7 +521,7 @@ var xxx_messageInfo_SensorSpec proto.InternalMessageInfo func (m *SensorStatus) Reset() { *m = SensorStatus{} } func (*SensorStatus) ProtoMessage() {} func (*SensorStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_generated_d152f1f0b79d4f38, []int{16} + return fileDescriptor_generated_eeefd321c74377c2, []int{17} } func (m *SensorStatus) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -521,7 +549,7 @@ var xxx_messageInfo_SensorStatus proto.InternalMessageInfo func (m *TimeFilter) Reset() { *m = TimeFilter{} } func (*TimeFilter) ProtoMessage() {} func (*TimeFilter) Descriptor() ([]byte, []int) { - return fileDescriptor_generated_d152f1f0b79d4f38, []int{17} + return fileDescriptor_generated_eeefd321c74377c2, []int{18} } func (m *TimeFilter) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -549,7 +577,7 @@ var xxx_messageInfo_TimeFilter proto.InternalMessageInfo func (m *Trigger) Reset() { *m = Trigger{} } func (*Trigger) ProtoMessage() {} func (*Trigger) Descriptor() ([]byte, []int) { - return fileDescriptor_generated_d152f1f0b79d4f38, []int{18} + return fileDescriptor_generated_eeefd321c74377c2, []int{19} } func (m *Trigger) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -574,10 +602,38 @@ func (m *Trigger) XXX_DiscardUnknown() { var xxx_messageInfo_Trigger proto.InternalMessageInfo +func (m *TriggerCondition) Reset() { *m = TriggerCondition{} } +func (*TriggerCondition) ProtoMessage() {} +func (*TriggerCondition) Descriptor() ([]byte, []int) { + return fileDescriptor_generated_eeefd321c74377c2, []int{20} +} +func (m *TriggerCondition) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *TriggerCondition) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (dst *TriggerCondition) XXX_Merge(src proto.Message) { + xxx_messageInfo_TriggerCondition.Merge(dst, src) +} +func (m *TriggerCondition) XXX_Size() int { + return m.Size() +} +func (m *TriggerCondition) XXX_DiscardUnknown() { + xxx_messageInfo_TriggerCondition.DiscardUnknown(m) +} + +var xxx_messageInfo_TriggerCondition proto.InternalMessageInfo + func (m *URLArtifact) Reset() { *m = URLArtifact{} } func (*URLArtifact) ProtoMessage() {} func (*URLArtifact) Descriptor() ([]byte, []int) { - return fileDescriptor_generated_d152f1f0b79d4f38, []int{19} + return fileDescriptor_generated_eeefd321c74377c2, []int{21} } func (m *URLArtifact) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -607,6 +663,7 @@ func init() { proto.RegisterType((*ConfigmapArtifact)(nil), "github.aaakk.us.kg.argoproj.argo_events.pkg.apis.sensor.v1alpha1.ConfigmapArtifact") proto.RegisterType((*Data)(nil), "github.aaakk.us.kg.argoproj.argo_events.pkg.apis.sensor.v1alpha1.Data") proto.RegisterType((*DataFilter)(nil), "github.aaakk.us.kg.argoproj.argo_events.pkg.apis.sensor.v1alpha1.DataFilter") + proto.RegisterType((*DependencyGroup)(nil), "github.aaakk.us.kg.argoproj.argo_events.pkg.apis.sensor.v1alpha1.DependencyGroup") proto.RegisterType((*EventDependency)(nil), "github.aaakk.us.kg.argoproj.argo_events.pkg.apis.sensor.v1alpha1.EventDependency") proto.RegisterType((*EventDependencyFilter)(nil), "github.aaakk.us.kg.argoproj.argo_events.pkg.apis.sensor.v1alpha1.EventDependencyFilter") proto.RegisterType((*FileArtifact)(nil), "github.aaakk.us.kg.argoproj.argo_events.pkg.apis.sensor.v1alpha1.FileArtifact") @@ -624,6 +681,7 @@ func init() { proto.RegisterMapType((map[string]NodeStatus)(nil), "github.aaakk.us.kg.argoproj.argo_events.pkg.apis.sensor.v1alpha1.SensorStatus.NodesEntry") proto.RegisterType((*TimeFilter)(nil), "github.aaakk.us.kg.argoproj.argo_events.pkg.apis.sensor.v1alpha1.TimeFilter") proto.RegisterType((*Trigger)(nil), "github.aaakk.us.kg.argoproj.argo_events.pkg.apis.sensor.v1alpha1.Trigger") + proto.RegisterType((*TriggerCondition)(nil), "github.aaakk.us.kg.argoproj.argo_events.pkg.apis.sensor.v1alpha1.TriggerCondition") proto.RegisterType((*URLArtifact)(nil), "github.aaakk.us.kg.argoproj.argo_events.pkg.apis.sensor.v1alpha1.URLArtifact") } func (m *ArtifactLocation) Marshal() (dAtA []byte, err error) { @@ -735,8 +793,8 @@ func (m *Data) MarshalTo(dAtA []byte) (int, error) { _ = i var l int _ = l - if len(m.Filters) > 0 { - for _, msg := range m.Filters { + if len(m.DataFilters) > 0 { + for _, msg := range m.DataFilters { dAtA[i] = 0xa i++ i = encodeVarintGenerated(dAtA, i, uint64(msg.Size())) @@ -780,6 +838,43 @@ func (m *DataFilter) MarshalTo(dAtA []byte) (int, error) { return i, nil } +func (m *DependencyGroup) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *DependencyGroup) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + dAtA[i] = 0xa + i++ + i = encodeVarintGenerated(dAtA, i, uint64(len(m.Name))) + i += copy(dAtA[i:], m.Name) + if len(m.Dependencies) > 0 { + for _, s := range m.Dependencies { + dAtA[i] = 0x12 + i++ + l = len(s) + for l >= 1<<7 { + dAtA[i] = uint8(uint64(l)&0x7f | 0x80) + l >>= 7 + i++ + } + dAtA[i] = uint8(l) + i++ + i += copy(dAtA[i:], s) + } + } + return i, nil +} + func (m *EventDependency) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -1286,6 +1381,22 @@ func (m *SensorSpec) MarshalTo(dAtA []byte) (int, error) { } i += n20 } + dAtA[i] = 0x2a + i++ + i = encodeVarintGenerated(dAtA, i, uint64(len(m.Circuit))) + i += copy(dAtA[i:], m.Circuit) + if len(m.DependencyGroups) > 0 { + for _, msg := range m.DependencyGroups { + dAtA[i] = 0x32 + i++ + i = encodeVarintGenerated(dAtA, i, uint64(msg.Size())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } return i, nil } @@ -1434,6 +1545,64 @@ func (m *Trigger) MarshalTo(dAtA []byte) (int, error) { } i += n25 } + if m.When != nil { + dAtA[i] = 0x2a + i++ + i = encodeVarintGenerated(dAtA, i, uint64(m.When.Size())) + n26, err := m.When.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n26 + } + return i, nil +} + +func (m *TriggerCondition) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *TriggerCondition) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Any) > 0 { + for _, s := range m.Any { + dAtA[i] = 0xa + i++ + l = len(s) + for l >= 1<<7 { + dAtA[i] = uint8(uint64(l)&0x7f | 0x80) + l >>= 7 + i++ + } + dAtA[i] = uint8(l) + i++ + i += copy(dAtA[i:], s) + } + } + if len(m.All) > 0 { + for _, s := range m.All { + dAtA[i] = 0x12 + i++ + l = len(s) + for l >= 1<<7 { + dAtA[i] = uint8(uint64(l)&0x7f | 0x80) + l >>= 7 + i++ + } + dAtA[i] = uint8(l) + i++ + i += copy(dAtA[i:], s) + } + } return i, nil } @@ -1526,8 +1695,8 @@ func (m *Data) Size() (n int) { } var l int _ = l - if len(m.Filters) > 0 { - for _, e := range m.Filters { + if len(m.DataFilters) > 0 { + for _, e := range m.DataFilters { l = e.Size() n += 1 + l + sovGenerated(uint64(l)) } @@ -1550,6 +1719,23 @@ func (m *DataFilter) Size() (n int) { return n } +func (m *DependencyGroup) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Name) + n += 1 + l + sovGenerated(uint64(l)) + if len(m.Dependencies) > 0 { + for _, s := range m.Dependencies { + l = len(s) + n += 1 + l + sovGenerated(uint64(l)) + } + } + return n +} + func (m *EventDependency) Size() (n int) { if m == nil { return 0 @@ -1771,6 +1957,14 @@ func (m *SensorSpec) Size() (n int) { l = m.EventProtocol.Size() n += 1 + l + sovGenerated(uint64(l)) } + l = len(m.Circuit) + n += 1 + l + sovGenerated(uint64(l)) + if len(m.DependencyGroups) > 0 { + for _, e := range m.DependencyGroups { + l = e.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + } return n } @@ -1832,6 +2026,31 @@ func (m *Trigger) Size() (n int) { l = m.RetryStrategy.Size() n += 1 + l + sovGenerated(uint64(l)) } + if m.When != nil { + l = m.When.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + return n +} + +func (m *TriggerCondition) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Any) > 0 { + for _, s := range m.Any { + l = len(s) + n += 1 + l + sovGenerated(uint64(l)) + } + } + if len(m.All) > 0 { + for _, s := range m.All { + l = len(s) + n += 1 + l + sovGenerated(uint64(l)) + } + } return n } @@ -1891,7 +2110,7 @@ func (this *Data) String() string { return "nil" } s := strings.Join([]string{`&Data{`, - `Filters:` + strings.Replace(fmt.Sprintf("%v", this.Filters), "DataFilter", "DataFilter", 1) + `,`, + `DataFilters:` + strings.Replace(fmt.Sprintf("%v", this.DataFilters), "DataFilter", "DataFilter", 1) + `,`, `}`, }, "") return s @@ -1908,6 +2127,17 @@ func (this *DataFilter) String() string { }, "") return s } +func (this *DependencyGroup) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&DependencyGroup{`, + `Name:` + fmt.Sprintf("%v", this.Name) + `,`, + `Dependencies:` + fmt.Sprintf("%v", this.Dependencies) + `,`, + `}`, + }, "") + return s +} func (this *EventDependency) String() string { if this == nil { return "nil" @@ -2062,6 +2292,8 @@ func (this *SensorSpec) String() string { `Triggers:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Triggers), "Trigger", "Trigger", 1), `&`, ``, 1) + `,`, `DeploySpec:` + strings.Replace(fmt.Sprintf("%v", this.DeploySpec), "PodSpec", "v11.PodSpec", 1) + `,`, `EventProtocol:` + strings.Replace(fmt.Sprintf("%v", this.EventProtocol), "EventProtocol", "common.EventProtocol", 1) + `,`, + `Circuit:` + fmt.Sprintf("%v", this.Circuit) + `,`, + `DependencyGroups:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.DependencyGroups), "DependencyGroup", "DependencyGroup", 1), `&`, ``, 1) + `,`, `}`, }, "") return s @@ -2111,6 +2343,18 @@ func (this *Trigger) String() string { `Resource:` + strings.Replace(fmt.Sprintf("%v", this.Resource), "ResourceObject", "ResourceObject", 1) + `,`, `Message:` + fmt.Sprintf("%v", this.Message) + `,`, `RetryStrategy:` + strings.Replace(fmt.Sprintf("%v", this.RetryStrategy), "RetryStrategy", "RetryStrategy", 1) + `,`, + `When:` + strings.Replace(fmt.Sprintf("%v", this.When), "TriggerCondition", "TriggerCondition", 1) + `,`, + `}`, + }, "") + return s +} +func (this *TriggerCondition) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&TriggerCondition{`, + `Any:` + fmt.Sprintf("%v", this.Any) + `,`, + `All:` + fmt.Sprintf("%v", this.All) + `,`, `}`, }, "") return s @@ -2514,7 +2758,7 @@ func (m *Data) Unmarshal(dAtA []byte) error { switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Filters", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field DataFilters", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -2538,8 +2782,8 @@ func (m *Data) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Filters = append(m.Filters, &DataFilter{}) - if err := m.Filters[len(m.Filters)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + m.DataFilters = append(m.DataFilters, &DataFilter{}) + if err := m.DataFilters[len(m.DataFilters)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -2701,6 +2945,114 @@ func (m *DataFilter) Unmarshal(dAtA []byte) error { } return nil } +func (m *DependencyGroup) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: DependencyGroup: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: DependencyGroup: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Name = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Dependencies", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Dependencies = append(m.Dependencies, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} func (m *EventDependency) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -4556,6 +4908,66 @@ func (m *SensorSpec) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Circuit", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Circuit = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field DependencyGroups", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.DependencyGroups = append(m.DependencyGroups, DependencyGroup{}) + if err := m.DependencyGroups[len(m.DependencyGroups)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipGenerated(dAtA[iNdEx:]) @@ -5148,6 +5560,147 @@ func (m *Trigger) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field When", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.When == nil { + m.When = &TriggerCondition{} + } + if err := m.When.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *TriggerCondition) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: TriggerCondition: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: TriggerCondition: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Any", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Any = append(m.Any, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field All", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.All = append(m.All, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipGenerated(dAtA[iNdEx:]) @@ -5374,119 +5927,127 @@ var ( ) func init() { - proto.RegisterFile("github.com/argoproj/argo-events/pkg/apis/sensor/v1alpha1/generated.proto", fileDescriptor_generated_d152f1f0b79d4f38) -} - -var fileDescriptor_generated_d152f1f0b79d4f38 = []byte{ - // 1753 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0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, 0x6a, 0x45, 0x75, 0x36, 0x6d, 0x95, 0xa4, 0x04, 0x2b, 0x74, 0xf4, 0x14, - 0x8a, 0xa3, 0x38, 0x68, 0x94, 0x14, 0xc9, 0xdd, 0xf5, 0x49, 0x3e, 0xc6, 0x27, 0x29, 0xc7, 0xf6, - 0x6c, 0xda, 0x2a, 0x7e, 0x8c, 0x4f, 0xb0, 0x84, 0x46, 0x9f, 0x41, 0xcd, 0x65, 0x61, 0xdf, 0x1f, - 0x0c, 0x49, 0xd4, 0x28, 0x2b, 0x9e, 0xe3, 0xf5, 0x79, 0x8e, 0x12, 0xa8, 0x94, 0x6d, 0x77, 0x36, - 0x6d, 0xd5, 0x52, 0x31, 0xce, 0xc8, 0xec, 0xbf, 0x5a, 0x70, 0x75, 0x49, 0x1f, 0x5d, 0x83, 0x52, - 0x48, 0x86, 0x54, 0x5d, 0x69, 0xad, 0xb3, 0xf3, 0x6c, 0xda, 0xda, 0x92, 0x3e, 0x79, 0x48, 0x86, - 0x14, 0xab, 0x15, 0xd4, 0x86, 0x9a, 0xfc, 0xe5, 0x11, 0x71, 0x93, 0x0b, 0xba, 0x6a, 0xd4, 0x6a, - 0x0f, 0x93, 0x05, 0x9c, 0xe9, 0xa0, 0x6f, 0x43, 0xf1, 0x82, 0x4e, 0xd4, 0x4d, 0xd5, 0x3a, 0x75, - 0xa3, 0x5a, 0x3c, 0xa6, 0x13, 0x2c, 0xe5, 0x36, 0x87, 0x52, 0x97, 0x08, 0x82, 0x2e, 0x60, 0xbb, - 0xef, 0x07, 0x82, 0xc6, 0xbc, 0x61, 0x5d, 0x2b, 0x5e, 0xaf, 0xdf, 0xea, 0xae, 0xef, 0x07, 0x09, - 0x78, 0x4f, 0x81, 0x75, 0xea, 0xb3, 0x69, 0x6b, 0x5b, 0x3f, 0x73, 0x9c, 0x30, 0xd8, 0x7f, 0xb4, - 0x00, 0x32, 0x25, 0x79, 0xea, 0x88, 0x88, 0xf3, 0xc5, 0x53, 0x9f, 0x12, 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, 0xcf, 0x2d, 0xd8, 0x8d, - 0x69, 0x14, 0xa4, 0x1d, 0xd8, 0x14, 0x81, 0xf7, 0x37, 0x31, 0x32, 0xd7, 0xd0, 0x75, 0x35, 0x98, - 0x13, 0xe1, 0x79, 0x42, 0xdb, 0x85, 0x7a, 0xee, 0xaf, 0xb2, 0x15, 0xfe, 0x96, 0xb9, 0x05, 0x30, - 0xa6, 0xb1, 0xdf, 0x9f, 0x1c, 0xd1, 0x58, 0x27, 0x7f, 0x35, 0x6b, 0xf4, 0x4f, 0xd2, 0x15, 0x9c, - 0xd3, 0xea, 0x38, 0xcf, 0x9e, 0x37, 0xb7, 0xbe, 0x7a, 0xde, 0xdc, 0xfa, 0xfa, 0x79, 0x73, 0xeb, - 0xf3, 0x59, 0xd3, 0x7a, 0x36, 0x6b, 0x5a, 0x5f, 0xcd, 0x9a, 0xd6, 0xd7, 0xb3, 0xa6, 0xf5, 0x9f, - 0x59, 0xd3, 0xfa, 0xe2, 0xbf, 0xcd, 0xad, 0x4f, 0xaa, 0xc9, 0x21, 0xfe, 0x1f, 0x00, 0x00, 0xff, - 0xff, 0xea, 0x8c, 0x1c, 0x55, 0xe5, 0x16, 0x00, 0x00, + proto.RegisterFile("github.com/argoproj/argo-events/pkg/apis/sensor/v1alpha1/generated.proto", fileDescriptor_generated_eeefd321c74377c2) +} + +var fileDescriptor_generated_eeefd321c74377c2 = []byte{ + // 1887 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x58, 0xcd, 0x6f, 0x1b, 0xc7, + 0x15, 0xd7, 0xf2, 0x4b, 0xe4, 0xa3, 0x64, 0xc9, 0xd3, 0x14, 0x61, 0x55, 0x94, 0x14, 0xb6, 0x17, + 0xb7, 0x48, 0x96, 0xb6, 0x95, 0x06, 0x6e, 0x8b, 0x7e, 0x68, 0x49, 0x3b, 0x76, 0x24, 0xdb, 0xca, + 0xd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xa6, 0x16, 0x38, 0x56, 0x8d, 0x7e, 0x09, 0x25, 0xde, 0x14, + 0x6a, 0xd6, 0xfd, 0x74, 0xbd, 0xbe, 0x93, 0x67, 0xe0, 0x5f, 0x58, 0x68, 0xd5, 0xaf, 0xc3, 0x56, + 0x76, 0xd0, 0xbe, 0xba, 0xc9, 0xf4, 0x3f, 0x6a, 0xb0, 0x2b, 0x1a, 0xe1, 0x31, 0x09, 0x23, 0x97, + 0xfa, 0x47, 0xae, 0xef, 0xf0, 0x5e, 0xea, 0x73, 0x9a, 0xda, 0x97, 0xf4, 0x92, 0x10, 0xc4, 0x92, + 0x87, 0xbe, 0x07, 0x9b, 0x63, 0xb9, 0x47, 0x75, 0x68, 0x52, 0x2b, 0x4a, 0x15, 0x8e, 0xf9, 0xdc, + 0x8d, 0x73, 0xd7, 0x77, 0x54, 0x6b, 0x26, 0x6e, 0x70, 0x5b, 0x58, 0x70, 0xf4, 0xbf, 0x97, 0x00, + 0x1e, 0x50, 0x87, 0xf4, 0x98, 0xc5, 0x46, 0x11, 0xda, 0x83, 0x82, 0xeb, 0x28, 0xeb, 0xa0, 0xc4, + 0x0b, 0xf7, 0xba, 0xb8, 0xe0, 0x3a, 0x49, 0xb5, 0x14, 0x2e, 0xac, 0x96, 0x1f, 0x40, 0xdd, 0x71, + 0xa3, 0xc0, 0xb3, 0x26, 0x9c, 0xa8, 0xac, 0x7e, 0x43, 0x09, 0xd6, 0xbb, 0x29, 0x0b, 0x67, 0xe5, + 0x92, 0x79, 0x53, 0x7a, 0xf9, 0xbc, 0xe1, 0xee, 0x65, 0xe6, 0xcd, 0x75, 0x28, 0x07, 0x03, 0x2b, + 0x22, 0xe2, 0x36, 0xa9, 0x99, 0x7b, 0x71, 0x8c, 0x4e, 0x38, 0xf1, 0x05, 0x1f, 0xd2, 0xd4, 0x21, + 0x62, 0x81, 0xa5, 0x20, 0x7a, 0x02, 0xb5, 0x88, 0x59, 0x21, 0x23, 0xce, 0x21, 0x6b, 0x54, 0x44, + 0xfe, 0xdb, 0x86, 0x84, 0x08, 0x46, 0x16, 0x22, 0xa4, 0x39, 0xe7, 0x08, 0xc6, 0x18, 0xdf, 0x30, + 0xee, 0xbb, 0x76, 0x48, 0x79, 0xa9, 0xa6, 0x2d, 0xd6, 0x8b, 0x35, 0xe1, 0x54, 0x29, 0x3a, 0x83, + 0xba, 0x4d, 0x87, 0x81, 0x47, 0xa4, 0x8d, 0xcd, 0xd5, 0x6c, 0x24, 0x91, 0xea, 0xa4, 0xba, 0x70, + 0x56, 0x31, 0x4f, 0xfd, 0x90, 0x44, 0x91, 0xd5, 0x27, 0x8d, 0xea, 0x7c, 0xea, 0xef, 0x4b, 0x32, + 0x8e, 0xf9, 0xe8, 0x23, 0x28, 0x8b, 0x4a, 0x6e, 0xd4, 0x84, 0x33, 0xef, 0xae, 0xd6, 0x53, 0x66, + 0x8d, 0x87, 0x56, 0x7c, 0x62, 0xa9, 0x4f, 0xff, 0x7d, 0x19, 0xae, 0x60, 0x12, 0xd1, 0x51, 0x68, + 0x93, 0x87, 0xa7, 0x9f, 0x10, 0x9b, 0xcd, 0x5f, 0x99, 0xda, 0x12, 0x57, 0xe6, 0x6f, 0xa0, 0xe2, + 0x59, 0xa7, 0xc4, 0xe3, 0xe3, 0x93, 0x5f, 0x83, 0x8f, 0x56, 0x6f, 0xc7, 0x79, 0x57, 0x8c, 0x63, + 0xa1, 0xf6, 0xb6, 0xcf, 0xc2, 0x89, 0x79, 0x45, 0xf9, 0x50, 0x91, 0x44, 0xac, 0x6c, 0xa2, 0xcf, + 0x00, 0x02, 0x2b, 0xb4, 0x86, 0x44, 0x0c, 0xf0, 0x92, 0xf0, 0xe0, 0x68, 0x7d, 0x0f, 0x4e, 0x62, + 0x9d, 0x26, 0x52, 0x86, 0x21, 0x21, 0x45, 0x38, 0x63, 0x12, 0x7d, 0xa1, 0xc1, 0x6e, 0x3f, 0xd7, + 0xfb, 0x0a, 0x1c, 0xbd, 0xbf, 0xba, 0x1f, 0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 0x1f, 0x57, 0xe3, + 0xf3, 0xff, 0x3f, 0x00, 0x00, 0xff, 0xff, 0x4a, 0x9c, 0x2e, 0x61, 0xcd, 0x18, 0x00, 0x00, } diff --git a/pkg/apis/sensor/v1alpha1/generated.proto b/pkg/apis/sensor/v1alpha1/generated.proto index 177d1db99c..56fd214051 100644 --- a/pkg/apis/sensor/v1alpha1/generated.proto +++ b/pkg/apis/sensor/v1alpha1/generated.proto @@ -56,7 +56,7 @@ message ConfigmapArtifact { message Data { // filter constraints - repeated DataFilter filters = 1; + repeated DataFilter dataFilters = 1; } // DataFilter describes constraints and filters for event data @@ -80,6 +80,15 @@ message DataFilter { optional string value = 3; } +// DependencyGroup is the group of dependencies +message DependencyGroup { + // Name of the group + optional string name = 1; + + // Dependencies of events + repeated string dependencies = 2; +} + // EventDependency describes a dependency message EventDependency { // Name is a unique name of this dependency @@ -92,7 +101,7 @@ message EventDependency { // and proper escalations should proceed. optional int64 deadline = 2; - // Filters and rules governing tolerations of success and constraints on the context and data of an event + // DataFilters and rules governing tolerations of success and constraints on the context and data of an event optional EventDependencyFilter filters = 3; // Connected tells if subscription is already setup in case of nats protocol. @@ -249,6 +258,12 @@ message SensorSpec { // EventProtocol is the protocol through which sensor receives events from gateway optional github.aaakk.us.kg.argoproj.argo_events.pkg.apis.common.EventProtocol eventProtocol = 4; + + // Circuit is a boolean expression of dependency groups + optional string circuit = 5; + + // DependencyGroups is a list of the groups of events. + repeated DependencyGroup dependencyGroups = 6; } // SensorStatus contains information about the status of a sensor. @@ -274,7 +289,7 @@ message SensorStatus { } // TimeFilter describes a window in time. -// Filters out event events that occur outside the time limits. +// DataFilters out event events that occur outside the time limits. // In other words, only events that occur after Start and before Stop // will pass this filter. message TimeFilter { @@ -302,6 +317,19 @@ message Trigger { // RetryStrategy is the strategy to retry a trigger if it fails optional RetryStrategy replyStrategy = 4; + + // When is the condition to execute the trigger + optional TriggerCondition when = 5; +} + +// TriggerCondition describes condition which must be satisfied in order to execute a trigger. +// Depending upon condition type, status of dependency groups is used to evaluate the result. +message TriggerCondition { + // Any acts as a OR operator between dependencies + repeated string any = 1; + + // All acts as a AND operator between dependencies + repeated string all = 2; } // URLArtifact contains information about an artifact at an http endpoint. diff --git a/pkg/apis/sensor/v1alpha1/openapi_generated.go b/pkg/apis/sensor/v1alpha1/openapi_generated.go index 0fcbd23734..6d152d5622 100644 --- a/pkg/apis/sensor/v1alpha1/openapi_generated.go +++ b/pkg/apis/sensor/v1alpha1/openapi_generated.go @@ -32,13 +32,11 @@ func GetOpenAPIDefinitions(ref common.ReferenceCallback) map[string]common.OpenA "github.com/argoproj/argo-events/pkg/apis/sensor/v1alpha1.ConfigmapArtifact": schema_pkg_apis_sensor_v1alpha1_ConfigmapArtifact(ref), "github.com/argoproj/argo-events/pkg/apis/sensor/v1alpha1.Data": schema_pkg_apis_sensor_v1alpha1_Data(ref), "github.com/argoproj/argo-events/pkg/apis/sensor/v1alpha1.DataFilter": schema_pkg_apis_sensor_v1alpha1_DataFilter(ref), + "github.com/argoproj/argo-events/pkg/apis/sensor/v1alpha1.DependencyGroup": schema_pkg_apis_sensor_v1alpha1_DependencyGroup(ref), "github.com/argoproj/argo-events/pkg/apis/sensor/v1alpha1.EventDependency": schema_pkg_apis_sensor_v1alpha1_EventDependency(ref), "github.com/argoproj/argo-events/pkg/apis/sensor/v1alpha1.EventDependencyFilter": schema_pkg_apis_sensor_v1alpha1_EventDependencyFilter(ref), - "github.com/argoproj/argo-events/pkg/apis/sensor/v1alpha1.EventProtocol": schema_pkg_apis_sensor_v1alpha1_EventProtocol(ref), "github.com/argoproj/argo-events/pkg/apis/sensor/v1alpha1.FileArtifact": schema_pkg_apis_sensor_v1alpha1_FileArtifact(ref), "github.com/argoproj/argo-events/pkg/apis/sensor/v1alpha1.GroupVersionKind": schema_pkg_apis_sensor_v1alpha1_GroupVersionKind(ref), - "github.com/argoproj/argo-events/pkg/apis/sensor/v1alpha1.Http": schema_pkg_apis_sensor_v1alpha1_Http(ref), - "github.com/argoproj/argo-events/pkg/apis/sensor/v1alpha1.Nats": schema_pkg_apis_sensor_v1alpha1_Nats(ref), "github.com/argoproj/argo-events/pkg/apis/sensor/v1alpha1.NodeStatus": schema_pkg_apis_sensor_v1alpha1_NodeStatus(ref), "github.com/argoproj/argo-events/pkg/apis/sensor/v1alpha1.ResourceObject": schema_pkg_apis_sensor_v1alpha1_ResourceObject(ref), "github.com/argoproj/argo-events/pkg/apis/sensor/v1alpha1.ResourceParameter": schema_pkg_apis_sensor_v1alpha1_ResourceParameter(ref), @@ -50,6 +48,7 @@ func GetOpenAPIDefinitions(ref common.ReferenceCallback) map[string]common.OpenA "github.com/argoproj/argo-events/pkg/apis/sensor/v1alpha1.SensorStatus": schema_pkg_apis_sensor_v1alpha1_SensorStatus(ref), "github.com/argoproj/argo-events/pkg/apis/sensor/v1alpha1.TimeFilter": schema_pkg_apis_sensor_v1alpha1_TimeFilter(ref), "github.com/argoproj/argo-events/pkg/apis/sensor/v1alpha1.Trigger": schema_pkg_apis_sensor_v1alpha1_Trigger(ref), + "github.com/argoproj/argo-events/pkg/apis/sensor/v1alpha1.TriggerCondition": schema_pkg_apis_sensor_v1alpha1_TriggerCondition(ref), "github.com/argoproj/argo-events/pkg/apis/sensor/v1alpha1.URLArtifact": schema_pkg_apis_sensor_v1alpha1_URLArtifact(ref), } } @@ -137,7 +136,7 @@ func schema_pkg_apis_sensor_v1alpha1_Data(ref common.ReferenceCallback) common.O SchemaProps: spec.SchemaProps{ Type: []string{"object"}, Properties: map[string]spec.Schema{ - "filters": { + "dataFilters": { SchemaProps: spec.SchemaProps{ Description: "filter constraints", Type: []string{"array"}, @@ -151,7 +150,7 @@ func schema_pkg_apis_sensor_v1alpha1_Data(ref common.ReferenceCallback) common.O }, }, }, - Required: []string{"filters"}, + Required: []string{"dataFilters"}, }, }, Dependencies: []string{ @@ -195,6 +194,42 @@ func schema_pkg_apis_sensor_v1alpha1_DataFilter(ref common.ReferenceCallback) co } } +func schema_pkg_apis_sensor_v1alpha1_DependencyGroup(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "DependencyGroup is the group of dependencies", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "name": { + SchemaProps: spec.SchemaProps{ + Description: "Name of the group", + Type: []string{"string"}, + Format: "", + }, + }, + "dependencies": { + SchemaProps: spec.SchemaProps{ + Description: "Dependencies of events", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + }, + Required: []string{"name", "dependencies"}, + }, + }, + Dependencies: []string{}, + } +} + func schema_pkg_apis_sensor_v1alpha1_EventDependency(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ @@ -218,7 +253,7 @@ func schema_pkg_apis_sensor_v1alpha1_EventDependency(ref common.ReferenceCallbac }, "filters": { SchemaProps: spec.SchemaProps{ - Description: "Filters and rules governing tolerations of success and constraints on the context and data of an event", + Description: "DataFilters and rules governing tolerations of success and constraints on the context and data of an event", Ref: ref("github.com/argoproj/argo-events/pkg/apis/sensor/v1alpha1.EventDependencyFilter"), }, }, @@ -279,41 +314,6 @@ func schema_pkg_apis_sensor_v1alpha1_EventDependencyFilter(ref common.ReferenceC } } -func schema_pkg_apis_sensor_v1alpha1_EventProtocol(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "EventProtocol contains configuration necessary to receieve an event from gateway over different communication protocols", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "type": { - SchemaProps: spec.SchemaProps{ - Description: "Type defines the type of protocol over which events will be receieved", - Type: []string{"string"}, - Format: "", - }, - }, - "http": { - SchemaProps: spec.SchemaProps{ - Description: "Http contains the information required to setup a http server and listen to incoming events", - Ref: ref("github.com/argoproj/argo-events/pkg/apis/sensor/v1alpha1.Http"), - }, - }, - "nats": { - SchemaProps: spec.SchemaProps{ - Description: "Nats contains the information required to connect to nats server and get subscriptions", - Ref: ref("github.com/argoproj/argo-events/pkg/apis/sensor/v1alpha1.Nats"), - }, - }, - }, - Required: []string{"type", "http", "nats"}, - }, - }, - Dependencies: []string{ - "github.com/argoproj/argo-events/pkg/apis/sensor/v1alpha1.Http", "github.com/argoproj/argo-events/pkg/apis/sensor/v1alpha1.Nats"}, - } -} - func schema_pkg_apis_sensor_v1alpha1_FileArtifact(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ @@ -367,113 +367,6 @@ func schema_pkg_apis_sensor_v1alpha1_GroupVersionKind(ref common.ReferenceCallba } } -func schema_pkg_apis_sensor_v1alpha1_Http(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "Http contains the information required to setup a http server and listen to incoming events", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "port": { - SchemaProps: spec.SchemaProps{ - Description: "Port on which server will run", - Type: []string{"string"}, - Format: "", - }, - }, - }, - Required: []string{"port"}, - }, - }, - Dependencies: []string{}, - } -} - -func schema_pkg_apis_sensor_v1alpha1_Nats(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "Nats contains the information required to connect to nats server and get subscriptions", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "url": { - SchemaProps: spec.SchemaProps{ - Description: "URL is nats server/service URL", - Type: []string{"string"}, - Format: "", - }, - }, - "startWithLastReceived": { - SchemaProps: spec.SchemaProps{ - Description: "Subscribe starting with most recently published value. Refer https://github.com/nats-io/go-nats-streaming", - Type: []string{"boolean"}, - Format: "", - }, - }, - "deliverAllAvailable": { - SchemaProps: spec.SchemaProps{ - Description: "Receive all stored values in order.", - Type: []string{"boolean"}, - Format: "", - }, - }, - "startAtSequence": { - SchemaProps: spec.SchemaProps{ - Description: "Receive messages starting at a specific sequence number", - Type: []string{"string"}, - Format: "", - }, - }, - "startAtTime": { - SchemaProps: spec.SchemaProps{ - Description: "Subscribe starting at a specific time", - Type: []string{"string"}, - Format: "", - }, - }, - "startAtTimeDelta": { - SchemaProps: spec.SchemaProps{ - Description: "Subscribe starting a specific amount of time in the past (e.g. 30 seconds ago)", - Type: []string{"string"}, - Format: "", - }, - }, - "durable": { - SchemaProps: spec.SchemaProps{ - Description: "Durable subscriptions allow clients to assign a durable name to a subscription when it is created", - Type: []string{"boolean"}, - Format: "", - }, - }, - "clusterId": { - SchemaProps: spec.SchemaProps{ - Description: "The NATS Streaming cluster ID", - Type: []string{"string"}, - Format: "", - }, - }, - "clientId": { - SchemaProps: spec.SchemaProps{ - Description: "The NATS Streaming cluster ID", - Type: []string{"string"}, - Format: "", - }, - }, - "type": { - SchemaProps: spec.SchemaProps{ - Description: "Type of the connection. either standard or streaming", - Type: []string{"string"}, - Format: "", - }, - }, - }, - Required: []string{"url", "type"}, - }, - }, - Dependencies: []string{}, - } -} - func schema_pkg_apis_sensor_v1alpha1_NodeStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ @@ -836,7 +729,27 @@ func schema_pkg_apis_sensor_v1alpha1_SensorSpec(ref common.ReferenceCallback) co "eventProtocol": { SchemaProps: spec.SchemaProps{ Description: "EventProtocol is the protocol through which sensor receives events from gateway", - Ref: ref("github.com/argoproj/argo-events/pkg/apis/sensor/v1alpha1.EventProtocol"), + Ref: ref("github.com/argoproj/argo-events/pkg/apis/common.EventProtocol"), + }, + }, + "circuit": { + SchemaProps: spec.SchemaProps{ + Description: "Circuit is a boolean expression of dependency groups", + Type: []string{"string"}, + Format: "", + }, + }, + "dependencyGroups": { + SchemaProps: spec.SchemaProps{ + Description: "DependencyGroups is a list of the groups of events.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("github.com/argoproj/argo-events/pkg/apis/sensor/v1alpha1.DependencyGroup"), + }, + }, + }, }, }, }, @@ -844,7 +757,7 @@ func schema_pkg_apis_sensor_v1alpha1_SensorSpec(ref common.ReferenceCallback) co }, }, Dependencies: []string{ - "github.com/argoproj/argo-events/pkg/apis/sensor/v1alpha1.EventDependency", "github.com/argoproj/argo-events/pkg/apis/sensor/v1alpha1.EventProtocol", "github.com/argoproj/argo-events/pkg/apis/sensor/v1alpha1.Trigger", "k8s.io/api/core/v1.PodSpec"}, + "github.com/argoproj/argo-events/pkg/apis/common.EventProtocol", "github.com/argoproj/argo-events/pkg/apis/sensor/v1alpha1.DependencyGroup", "github.com/argoproj/argo-events/pkg/apis/sensor/v1alpha1.EventDependency", "github.com/argoproj/argo-events/pkg/apis/sensor/v1alpha1.Trigger", "k8s.io/api/core/v1.PodSpec"}, } } @@ -914,7 +827,7 @@ func schema_pkg_apis_sensor_v1alpha1_TimeFilter(ref common.ReferenceCallback) co return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "TimeFilter describes a window in time. Filters out event events that occur outside the time limits. In other words, only events that occur after Start and before Stop will pass this filter.", + Description: "TimeFilter describes a window in time. DataFilters out event events that occur outside the time limits. In other words, only events that occur after Start and before Stop will pass this filter.", Type: []string{"object"}, Properties: map[string]spec.Schema{ "start": { @@ -971,12 +884,60 @@ func schema_pkg_apis_sensor_v1alpha1_Trigger(ref common.ReferenceCallback) commo Ref: ref("github.com/argoproj/argo-events/pkg/apis/sensor/v1alpha1.RetryStrategy"), }, }, + "when": { + SchemaProps: spec.SchemaProps{ + Description: "When is the condition to execute the trigger", + Ref: ref("github.com/argoproj/argo-events/pkg/apis/sensor/v1alpha1.TriggerCondition"), + }, + }, }, - Required: []string{"name", "retryStrategy"}, + Required: []string{"name"}, }, }, Dependencies: []string{ - "github.com/argoproj/argo-events/pkg/apis/sensor/v1alpha1.ResourceObject", "github.com/argoproj/argo-events/pkg/apis/sensor/v1alpha1.RetryStrategy"}, + "github.com/argoproj/argo-events/pkg/apis/sensor/v1alpha1.ResourceObject", "github.com/argoproj/argo-events/pkg/apis/sensor/v1alpha1.RetryStrategy", "github.com/argoproj/argo-events/pkg/apis/sensor/v1alpha1.TriggerCondition"}, + } +} + +func schema_pkg_apis_sensor_v1alpha1_TriggerCondition(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "TriggerCondition describes condition which must be satisfied in order to execute a trigger. Depending upon condition type, status of dependency groups is used to evaluate the result.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "any": { + SchemaProps: spec.SchemaProps{ + Description: "Any acts as a OR operator between dependencies", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "all": { + SchemaProps: spec.SchemaProps{ + Description: "All acts as a AND operator between dependencies", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + }, + }, + }, + Dependencies: []string{}, } } @@ -1000,6 +961,7 @@ func schema_pkg_apis_sensor_v1alpha1_URLArtifact(ref common.ReferenceCallback) c }, }, }, + Required: []string{"path"}, }, }, Dependencies: []string{}, diff --git a/pkg/apis/sensor/v1alpha1/types.go b/pkg/apis/sensor/v1alpha1/types.go index bf9e5049ac..40be2b4104 100644 --- a/pkg/apis/sensor/v1alpha1/types.go +++ b/pkg/apis/sensor/v1alpha1/types.go @@ -40,6 +40,7 @@ type NodeType string const ( NodeTypeEventDependency NodeType = "EventDependency" NodeTypeTrigger NodeType = "Trigger" + NodeTypeDependencyGroup NodeType = "DependencyGroup" ) // NodePhase is the label for the condition of a node @@ -59,8 +60,7 @@ const ( // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object // +k8s:openapi-gen=true type Sensor struct { - v1.TypeMeta `json:",inline"` - + v1.TypeMeta `json:",inline"` v1.ObjectMeta `json:"metadata" protobuf:"bytes,1,opt,name=metadata"` Spec SensorSpec `json:"spec" protobuf:"bytes,2,opt,name=spec"` Status SensorStatus `json:"status" protobuf:"bytes,3,opt,name=status"` @@ -83,16 +83,22 @@ type SensorSpec struct { Triggers []Trigger `json:"triggers" protobuf:"bytes,2,rep,name=triggers"` // DeploySpec contains sensor pod specification. For more information, read https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.11/#pod-v1-core - DeploySpec *corev1.PodSpec `json:"deploySpec" protobuf:"bytes,3,opt,name=deploySpec"` + DeploySpec *corev1.PodSpec `json:"deploySpec" protobuf:"bytes,3,name=deploySpec"` // EventProtocol is the protocol through which sensor receives events from gateway - EventProtocol *apicommon.EventProtocol `json:"eventProtocol" protobuf:"bytes,4,opt,name=eventProtocol"` + EventProtocol *apicommon.EventProtocol `json:"eventProtocol" protobuf:"bytes,4,name=eventProtocol"` + + // Circuit is a boolean expression of dependency groups + Circuit string `json:"circuit,omitempty" protobuf:"bytes,5,rep,name=circuit"` + + // DependencyGroups is a list of the groups of events. + DependencyGroups []DependencyGroup `json:"dependencyGroups,omitempty" protobuf:"bytes,6,rep,name=dependencyGroups"` } // EventDependency describes a dependency type EventDependency struct { // Name is a unique name of this dependency - Name string `json:"name" protobuf:"bytes,1,opt,name=name"` + Name string `json:"name" protobuf:"bytes,1,name=name"` // Deadline is the duration in seconds after the StartedAt time of the sensor after which this event is terminated. // Note: this functionality is not yet respected, but it's theoretical behavior is as follows: @@ -101,25 +107,33 @@ type EventDependency struct { // and proper escalations should proceed. Deadline int64 `json:"deadline,omitempty" protobuf:"bytes,2,opt,name=deadline"` - // Filters and rules governing tolerations of success and constraints on the context and data of an event + // DataFilters and rules governing tolerations of success and constraints on the context and data of an event Filters EventDependencyFilter `json:"filters,omitempty" protobuf:"bytes,3,opt,name=filters"` // Connected tells if subscription is already setup in case of nats protocol. Connected bool `json:"connected,omitempty" protobuf:"bytes,4,opt,name=connected"` } +// DependencyGroup is the group of dependencies +type DependencyGroup struct { + // Name of the group + Name string `json:"name" protobuf:"bytes,1,name=name"` + // Dependencies of events + Dependencies []string `json:"dependencies" protobuf:"bytes,2,name=dependencies"` +} + // GroupVersionKind unambiguously identifies a kind. It doesn't anonymously include GroupVersion // to avoid automatic coercion. It doesn't use a GroupVersion to avoid custom marshalling. type GroupVersionKind struct { - Group string `json:"group" protobuf:"bytes,1,opt,name=group"` - Version string `json:"version" protobuf:"bytes,2,opt,name=version"` - Kind string `json:"kind" protobuf:"bytes,3,opt,name=kind"` + Group string `json:"group" protobuf:"bytes,1,name=group"` + Version string `json:"version" protobuf:"bytes,2,name=version"` + Kind string `json:"kind" protobuf:"bytes,3,name=kind"` } // EventDependencyFilter defines filters and constraints for a event. type EventDependencyFilter struct { // Name is the name of event filter - Name string `json:"name" protobuf:"bytes,1,opt,name=name"` + Name string `json:"name" protobuf:"bytes,1,name=name"` // Time filter on the event with escalation Time *TimeFilter `json:"time,omitempty" protobuf:"bytes,2,opt,name=time"` @@ -132,7 +146,7 @@ type EventDependencyFilter struct { } // TimeFilter describes a window in time. -// Filters out event events that occur outside the time limits. +// DataFilters out event events that occur outside the time limits. // In other words, only events that occur after Start and before Stop // will pass this filter. type TimeFilter struct { @@ -159,7 +173,7 @@ const ( type Data struct { // filter constraints - Filters []*DataFilter `json:"filters" protobuf:"bytes,1,rep,name=filters"` + DataFilters []*DataFilter `json:"dataFilters" protobuf:"bytes,1,rep,name=dataFilters"` } // DataFilter describes constraints and filters for event data @@ -186,7 +200,7 @@ type DataFilter struct { // Trigger is an action taken, output produced, an event created, a message sent type Trigger struct { // Name is a unique name of the action to take - Name string `json:"name" protobuf:"bytes,1,opt,name=name"` + Name string `json:"name" protobuf:"bytes,1,name=name"` // Resource describes the resource that will be created by this action Resource *ResourceObject `json:"resource,omitempty" protobuf:"bytes,2,opt,name=resource"` @@ -195,19 +209,32 @@ type Trigger struct { Message string `json:"message,omitempty" protobuf:"bytes,3,opt,name=message"` // RetryStrategy is the strategy to retry a trigger if it fails - RetryStrategy *RetryStrategy `json:"retryStrategy" protobuf:"bytes,4,opt,name=replyStrategy"` + RetryStrategy *RetryStrategy `json:"retryStrategy,omitempty" protobuf:"bytes,4,opt,name=replyStrategy"` + + // When is the condition to execute the trigger + When *TriggerCondition `json:"when,omitempty" protobuf:"bytes,5,opt,name=when"` +} + +// TriggerCondition describes condition which must be satisfied in order to execute a trigger. +// Depending upon condition type, status of dependency groups is used to evaluate the result. +type TriggerCondition struct { + // Any acts as a OR operator between dependencies + Any []string `json:"any,omitempty" protobuf:"bytes,1,rep,name=any"` + + // All acts as a AND operator between dependencies + All []string `json:"all,omitempty" protobuf:"bytes,2,rep,name=all"` } // ResourceParameter indicates a passed parameter to a service template type ResourceParameter struct { // Src contains a source reference to the value of the resource parameter from a event event - Src *ResourceParameterSource `json:"src" protobuf:"bytes,1,opt,name=src"` + Src *ResourceParameterSource `json:"src" protobuf:"bytes,1,name=src"` // Dest is the JSONPath of a resource key. // A path is a series of keys separated by a dot. The colon character can be escaped with '.' // The -1 key can be used to append a value to an existing array. // See https://github.com/tidwall/sjson#path-syntax for more information about how this is used. - Dest string `json:"dest" protobuf:"bytes,2,opt,name=dest"` + Dest string `json:"dest" protobuf:"bytes,2,name=dest"` } // ResourceParameterSource defines the source for a resource parameter from a event event @@ -318,11 +345,11 @@ type ArtifactLocation struct { // ConfigmapArtifact contains information about artifact in k8 configmap type ConfigmapArtifact struct { // Name of the configmap - Name string `json:"name" protobuf:"bytes,1,opt,name=name"` + Name string `json:"name" protobuf:"bytes,1,name=name"` // Namespace where configmap is deployed - Namespace string `json:"namespace" protobuf:"bytes,2,opt,name=namespace"` + Namespace string `json:"namespace" protobuf:"bytes,2,name=namespace"` // Key within configmap data which contains trigger resource definition - Key string `json:"key" protobuf:"bytes,3,opt,name=key"` + Key string `json:"key" protobuf:"bytes,3,name=key"` } // FileArtifact contains information about an artifact in a filesystem @@ -332,7 +359,7 @@ type FileArtifact struct { // URLArtifact contains information about an artifact at an http endpoint. type URLArtifact struct { - Path string `json:"path,omitempty" protobuf:"bytes,1,opt,name=path"` + Path string `json:"path" protobuf:"bytes,1,name=path"` VerifyCert bool `json:"verifyCert,omitempty" protobuf:"bytes,2,opt,name=verifyCert"` } diff --git a/pkg/apis/sensor/v1alpha1/zz_generated.deepcopy.go b/pkg/apis/sensor/v1alpha1/zz_generated.deepcopy.go index 3560b2ff32..735195f7dd 100644 --- a/pkg/apis/sensor/v1alpha1/zz_generated.deepcopy.go +++ b/pkg/apis/sensor/v1alpha1/zz_generated.deepcopy.go @@ -85,8 +85,8 @@ func (in *ConfigmapArtifact) DeepCopy() *ConfigmapArtifact { // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *Data) DeepCopyInto(out *Data) { *out = *in - if in.Filters != nil { - in, out := &in.Filters, &out.Filters + if in.DataFilters != nil { + in, out := &in.DataFilters, &out.DataFilters *out = make([]*DataFilter, len(*in)) for i := range *in { if (*in)[i] != nil { @@ -125,6 +125,27 @@ func (in *DataFilter) DeepCopy() *DataFilter { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *DependencyGroup) DeepCopyInto(out *DependencyGroup) { + *out = *in + if in.Dependencies != nil { + in, out := &in.Dependencies, &out.Dependencies + *out = make([]string, len(*in)) + copy(*out, *in) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DependencyGroup. +func (in *DependencyGroup) DeepCopy() *DependencyGroup { + if in == nil { + return nil + } + out := new(DependencyGroup) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *EventDependency) DeepCopyInto(out *EventDependency) { *out = *in @@ -406,6 +427,13 @@ func (in *SensorSpec) DeepCopyInto(out *SensorSpec) { *out = new(common.EventProtocol) **out = **in } + if in.DependencyGroups != nil { + in, out := &in.DependencyGroups, &out.DependencyGroups + *out = make([]DependencyGroup, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } return } @@ -473,6 +501,11 @@ func (in *Trigger) DeepCopyInto(out *Trigger) { *out = new(RetryStrategy) **out = **in } + if in.When != nil { + in, out := &in.When, &out.When + *out = new(TriggerCondition) + (*in).DeepCopyInto(*out) + } return } @@ -486,6 +519,32 @@ func (in *Trigger) DeepCopy() *Trigger { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *TriggerCondition) DeepCopyInto(out *TriggerCondition) { + *out = *in + if in.Any != nil { + in, out := &in.Any, &out.Any + *out = make([]string, len(*in)) + copy(*out, *in) + } + if in.All != nil { + in, out := &in.All, &out.All + *out = make([]string, len(*in)) + copy(*out, *in) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TriggerCondition. +func (in *TriggerCondition) DeepCopy() *TriggerCondition { + if in == nil { + return nil + } + out := new(TriggerCondition) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *URLArtifact) DeepCopyInto(out *URLArtifact) { *out = *in diff --git a/sensors/config.go b/sensors/config.go index 6ef399dd6f..2a1d91ecde 100644 --- a/sensors/config.go +++ b/sensors/config.go @@ -1,3 +1,19 @@ +/* +Copyright 2018 BlackRock, Inc. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + package sensors import ( diff --git a/sensors/event-handler.go b/sensors/event-handler.go index 5e903c2b2b..c4121e7fd5 100644 --- a/sensors/event-handler.go +++ b/sensors/event-handler.go @@ -98,7 +98,17 @@ func (sec *sensorExecutionCtx) processUpdateNotification(ew *updateNotification) sn.MarkNodePhase(sec.sensor, ew.event.Context.Source.Host, v1alpha1.NodeTypeEventDependency, v1alpha1.NodePhaseComplete, ew.event, &sec.log, "event is received") - // check if all event dependencies are complete and kick-off triggers + // check if triggers can be processed and executed + canProcess, err := sec.canProcessTriggers() + if err != nil { + sec.log.Error().Err(err).Msg("error occurred while determining triggers can be processed") + return + } + + if !canProcess { + sec.log.Info().Msg("triggers can't be processed at this time, won't fire triggers") + return + } sec.processTriggers() case v1alpha1.ResourceUpdateNotification: @@ -108,11 +118,19 @@ func (sec *sensorExecutionCtx) processUpdateNotification(ew *updateNotification) hasDependenciesUpdated := false - // initialize new event dependencies - for _, ed := range sec.sensor.Spec.Dependencies { - if node := sn.GetNodeByName(sec.sensor, ed.Name); node == nil { - sn.InitializeNode(sec.sensor, ed.Name, v1alpha1.NodeTypeEventDependency, &sec.log) - sn.MarkNodePhase(sec.sensor, ed.Name, v1alpha1.NodeTypeEventDependency, v1alpha1.NodePhaseActive, nil, &sec.log, "event dependency is active") + // initialize new dependencies + for _, dependency := range sec.sensor.Spec.Dependencies { + if node := sn.GetNodeByName(sec.sensor, dependency.Name); node == nil { + sn.InitializeNode(sec.sensor, dependency.Name, v1alpha1.NodeTypeEventDependency, &sec.log) + sn.MarkNodePhase(sec.sensor, dependency.Name, v1alpha1.NodeTypeEventDependency, v1alpha1.NodePhaseActive, nil, &sec.log, "dependency is active") + } + } + + // initialize new dependency groups + for _, group := range sec.sensor.Spec.DependencyGroups { + if node := sn.GetNodeByName(sec.sensor, group.Name); node == nil { + sn.InitializeNode(sec.sensor, group.Name, v1alpha1.NodeTypeDependencyGroup, &sec.log) + sn.MarkNodePhase(sec.sensor, group.Name, v1alpha1.NodeTypeDependencyGroup, v1alpha1.NodePhaseActive, nil, &sec.log, "dependency group is active") } } @@ -168,9 +186,9 @@ func (sec *sensorExecutionCtx) WatchEventsFromGateways() { // validateEvent validates whether the event is indeed from gateway that this sensor is watching func (sec *sensorExecutionCtx) validateEvent(events *apicommon.Event) (*ss_v1alpha1.EventDependency, bool) { - for _, event := range sec.sensor.Spec.Dependencies { - if event.Name == events.Context.Source.Host { - return &event, true + for _, dependency := range sec.sensor.Spec.Dependencies { + if dependency.Name == events.Context.Source.Host { + return &dependency, true } } return nil, false diff --git a/sensors/signal-filter.go b/sensors/signal-filter.go index 4c64110778..60d85cd126 100644 --- a/sensors/signal-filter.go +++ b/sensors/signal-filter.go @@ -153,7 +153,7 @@ func (sec *sensorExecutionCtx) filterData(data *v1alpha1.Data, event *apicommon. if data == nil { return true, nil } - dataFilters := data.Filters + dataFilters := data.DataFilters if dataFilters == nil { return true, nil } diff --git a/sensors/signal-filter_test.go b/sensors/signal-filter_test.go index 8414fbf727..abc0dd0cad 100644 --- a/sensors/signal-filter_test.go +++ b/sensors/signal-filter_test.go @@ -134,7 +134,7 @@ func Test_filterData(t *testing.T) { name: "string filter, JSON data", args: args{ data: &v1alpha1.Data{ - Filters: []*v1alpha1.DataFilter{ + DataFilters: []*v1alpha1.DataFilter{ { Path: "k", Type: v1alpha1.JSONTypeString, @@ -154,7 +154,7 @@ func Test_filterData(t *testing.T) { { name: "number filter, JSON data", args: args{data: &v1alpha1.Data{ - Filters: []*v1alpha1.DataFilter{ + DataFilters: []*v1alpha1.DataFilter{ { Path: "k", Type: v1alpha1.JSONTypeNumber, @@ -175,7 +175,7 @@ func Test_filterData(t *testing.T) { name: "multiple filters, nested JSON data", args: args{ data: &v1alpha1.Data{ - Filters: []*v1alpha1.DataFilter{ + DataFilters: []*v1alpha1.DataFilter{ { Path: "k", Type: v1alpha1.JSONTypeString, diff --git a/sensors/trigger.go b/sensors/trigger.go index 25e785c70b..5336652bed 100644 --- a/sensors/trigger.go +++ b/sensors/trigger.go @@ -18,6 +18,7 @@ package sensors import ( "fmt" + "github.com/Knetic/govaluate" "github.com/argoproj/argo-events/common" sn "github.com/argoproj/argo-events/controllers/sensor" @@ -30,60 +31,126 @@ import ( "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" ) -// processTriggers checks if all event dependencies are complete and then starts executing triggers -func (sec *sensorExecutionCtx) processTriggers() { - // to trigger the sensor action/s we need to check if all event dependencies are completed and sensor is active - if sec.sensor.AreAllNodesSuccess(v1alpha1.NodeTypeEventDependency) { - sec.log.Info().Msg("all event dependencies are marked completed, processing triggers") +// canProcessTriggers evaluates whether triggers can be processed and executed +func (sec *sensorExecutionCtx) canProcessTriggers() (bool, error) { + if sec.sensor.Spec.DependencyGroups != nil { + groups := make(map[string]interface{}, len(sec.sensor.Spec.DependencyGroups)) + group: + for _, group := range sec.sensor.Spec.DependencyGroups { + for _, dependency := range group.Dependencies { + if nodeStatus := sn.GetNodeByName(sec.sensor, dependency); nodeStatus.Phase != v1alpha1.NodePhaseComplete { + groups[group.Name] = false + continue group + } + } + sn.MarkNodePhase(sec.sensor, group.Name, v1alpha1.NodeTypeDependencyGroup, v1alpha1.NodePhaseComplete, nil, &sec.log, "dependency group is complete") + groups[group.Name] = true + } + + expression, err := govaluate.NewEvaluableExpression(sec.sensor.Spec.Circuit) + if err != nil { + return false, fmt.Errorf("failed to create circuit expression. err: %+v", err) + } - // labels for K8s event - labels := map[string]string{ - common.LabelSensorName: sec.sensor.Name, - common.LabelOperation: "process_triggers", + result, err := expression.Evaluate(groups) + if err != nil { + return false, fmt.Errorf("failed to evaluate circuit expression. err: %+v", err) } - for _, trigger := range sec.sensor.Spec.Triggers { - if err := sec.executeTrigger(trigger); err != nil { - sec.log.Error().Str("trigger-name", trigger.Name).Err(err).Msg("trigger failed to execute") + return result == true, err + } - sn.MarkNodePhase(sec.sensor, trigger.Name, v1alpha1.NodeTypeTrigger, v1alpha1.NodePhaseError, nil, &sec.log, fmt.Sprintf("failed to execute trigger. err: %+v", err)) + if sec.sensor.AreAllNodesSuccess(v1alpha1.NodeTypeEventDependency) { + return true, nil + } - // escalate using K8s event - labels[common.LabelEventType] = string(common.EscalationEventType) - if err := common.GenerateK8sEvent(sec.kubeClient, fmt.Sprintf("failed to execute trigger %s", trigger.Name), common.EscalationEventType, - "trigger failure", sec.sensor.Name, sec.sensor.Namespace, sec.controllerInstanceID, sensor.Kind, labels); err != nil { - sec.log.Error().Err(err).Msg("failed to create K8s event to escalate trigger failure") - } - continue + return false, nil +} + +// canExecuteTrigger determines whether a trigger is executable based on condition set on trigger +func (sec *sensorExecutionCtx) canExecuteTrigger(trigger v1alpha1.Trigger) bool { + if trigger.When == nil { + return true + } + if trigger.When.Any != nil { + for _, group := range trigger.When.Any { + if status := sn.GetNodeByName(sec.sensor, group); status.Type == v1alpha1.NodeTypeDependencyGroup && status.Phase == v1alpha1.NodePhaseComplete { + return true + } + return false + } + } + if trigger.When.All != nil { + for _, group := range trigger.When.All { + if status := sn.GetNodeByName(sec.sensor, group); status.Type == v1alpha1.NodeTypeDependencyGroup && status.Phase != v1alpha1.NodePhaseComplete { + return false } + return true + } + } + return true +} + +// processTriggers checks if all event dependencies are complete and then starts executing triggers +func (sec *sensorExecutionCtx) processTriggers() { + // to trigger the sensor action/s we need to check if all event dependencies are completed and sensor is active + sec.log.Info().Msg("all event dependencies are marked completed, processing triggers") + + // labels for K8s event + labels := map[string]string{ + common.LabelSensorName: sec.sensor.Name, + common.LabelOperation: "process_triggers", + } + + for _, trigger := range sec.sensor.Spec.Triggers { + // check if a trigger condition is set + if canExecute := sec.canExecuteTrigger(trigger); !canExecute { + sec.log.Info().Str("trigger-name", trigger.Name).Msg("trigger can't be executed because trigger condition failed") + continue + } - // mark trigger as complete. - sn.MarkNodePhase(sec.sensor, trigger.Name, v1alpha1.NodeTypeTrigger, v1alpha1.NodePhaseComplete, nil, &sec.log, "successfully executed trigger") + if err := sec.executeTrigger(trigger); err != nil { + sec.log.Error().Str("trigger-name", trigger.Name).Err(err).Msg("trigger failed to execute") - labels[common.LabelEventType] = string(common.OperationSuccessEventType) - if err := common.GenerateK8sEvent(sec.kubeClient, fmt.Sprintf("trigger %s executed successfully", trigger.Name), common.OperationSuccessEventType, - "trigger executed", sec.sensor.Name, sec.sensor.Namespace, sec.controllerInstanceID, sensor.Kind, labels); err != nil { - sec.log.Error().Err(err).Msg("failed to create K8s event to log trigger execution") + sn.MarkNodePhase(sec.sensor, trigger.Name, v1alpha1.NodeTypeTrigger, v1alpha1.NodePhaseError, nil, &sec.log, fmt.Sprintf("failed to execute trigger. err: %+v", err)) + + // escalate using K8s event + labels[common.LabelEventType] = string(common.EscalationEventType) + if err := common.GenerateK8sEvent(sec.kubeClient, fmt.Sprintf("failed to execute trigger %s", trigger.Name), common.EscalationEventType, + "trigger failure", sec.sensor.Name, sec.sensor.Namespace, sec.controllerInstanceID, sensor.Kind, labels); err != nil { + sec.log.Error().Err(err).Msg("failed to create K8s event to escalate trigger failure") } + continue } - // increment completion counter - sec.sensor.Status.CompletionCount = sec.sensor.Status.CompletionCount + 1 + // mark trigger as complete. + sn.MarkNodePhase(sec.sensor, trigger.Name, v1alpha1.NodeTypeTrigger, v1alpha1.NodePhaseComplete, nil, &sec.log, "successfully executed trigger") - // create K8s event to mark the trigger round completion labels[common.LabelEventType] = string(common.OperationSuccessEventType) - if err := common.GenerateK8sEvent(sec.kubeClient, fmt.Sprintf("completion count:%d", sec.sensor.Status.CompletionCount), common.OperationSuccessEventType, - "triggers execution round completion", sec.sensor.Name, sec.sensor.Namespace, sec.controllerInstanceID, sensor.Kind, labels); err != nil { - sec.log.Error().Err(err).Msg("failed to create K8s event to log trigger execution round completion") + if err := common.GenerateK8sEvent(sec.kubeClient, fmt.Sprintf("trigger %s executed successfully", trigger.Name), common.OperationSuccessEventType, + "trigger executed", sec.sensor.Name, sec.sensor.Namespace, sec.controllerInstanceID, sensor.Kind, labels); err != nil { + sec.log.Error().Err(err).Msg("failed to create K8s event to log trigger execution") } + } - // Mark all signal nodes as active - for _, dep := range sec.sensor.Spec.Dependencies { - sn.MarkNodePhase(sec.sensor, dep.Name, v1alpha1.NodeTypeEventDependency, v1alpha1.NodePhaseActive, nil, &sec.log, "node is re-initialized") - } - return + // increment completion counter + sec.sensor.Status.CompletionCount = sec.sensor.Status.CompletionCount + 1 + + // create K8s event to mark the trigger round completion + labels[common.LabelEventType] = string(common.OperationSuccessEventType) + if err := common.GenerateK8sEvent(sec.kubeClient, fmt.Sprintf("completion count:%d", sec.sensor.Status.CompletionCount), common.OperationSuccessEventType, + "triggers execution round completion", sec.sensor.Name, sec.sensor.Namespace, sec.controllerInstanceID, sensor.Kind, labels); err != nil { + sec.log.Error().Err(err).Msg("failed to create K8s event to log trigger execution round completion") + } + + // Mark all dependency nodes as active + for _, dependency := range sec.sensor.Spec.Dependencies { + sn.MarkNodePhase(sec.sensor, dependency.Name, v1alpha1.NodeTypeEventDependency, v1alpha1.NodePhaseActive, nil, &sec.log, "dependency is re-activated") + } + // Mark all dependency groups as active + for _, group := range sec.sensor.Spec.DependencyGroups { + sn.MarkNodePhase(sec.sensor, group.Name, v1alpha1.NodeTypeDependencyGroup, v1alpha1.NodePhaseActive, nil, &sec.log, "dependency group is re-activated") } - sec.log.Info().Msg("triggers can't be executed because event dependencies are not complete") } // execute the trigger