From 13ab0b36d58f2722f5eeb73a18e5c08d4181c66c Mon Sep 17 00:00:00 2001 From: Eduardo Apolinario Date: Wed, 29 May 2024 16:43:24 -0700 Subject: [PATCH 01/19] Fix the name of flytepropeller in invocation of script Signed-off-by: Eduardo Apolinario --- flytepropeller/Makefile | 2 +- flytepropeller/hack/update-codegen.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/flytepropeller/Makefile b/flytepropeller/Makefile index 351ff9ed03..eb8d727cdf 100644 --- a/flytepropeller/Makefile +++ b/flytepropeller/Makefile @@ -37,7 +37,7 @@ cross_compile: go build -o bin/cross/kubectl-flyte ./cmd/kubectl-flyte/main.go op_code_generate: - @RESOURCE_NAME=flyteworkflow OPERATOR_PKG=github.com/flyteorg/flytepropeller ./hack/update-codegen.sh + @RESOURCE_NAME=flyteworkflow OPERATOR_PKG=github.com/flyteorg/flyte/flytepropeller ./hack/update-codegen.sh benchmark: mkdir -p ./bin/benchmark diff --git a/flytepropeller/hack/update-codegen.sh b/flytepropeller/hack/update-codegen.sh index 82a1ef21fd..6c177456c9 100755 --- a/flytepropeller/hack/update-codegen.sh +++ b/flytepropeller/hack/update-codegen.sh @@ -36,7 +36,7 @@ bash ${CODEGEN_PKG}/generate-groups.sh "deepcopy,client,informer,lister" \ ${OPERATOR_PKG}/pkg/client \ ${OPERATOR_PKG}/pkg/apis \ ${RESOURCE_NAME}:v1alpha1 \ - --output-base "$(dirname ${BASH_SOURCE})/../../../.." \ + --output-base "$(dirname ${BASH_SOURCE})/../../../../.." \ --go-header-file ${SCRIPT_ROOT}/hack/boilerplate.go.txt # To use your own boilerplate text use: From 0690d8ae37dcbc1b99ae59f6bf49566a3e4feb0b Mon Sep 17 00:00:00 2001 From: Eduardo Apolinario Date: Wed, 29 May 2024 16:54:13 -0700 Subject: [PATCH 02/19] Pull in k8s.io/code-generator v0.24.1 and uncomment line Signed-off-by: Eduardo Apolinario --- flytepropeller/go.mod | 5 +++ flytepropeller/go.sum | 80 +++++++++++++++++++++++++++++++++++- flytepropeller/hack/tools.go | 2 +- 3 files changed, 84 insertions(+), 3 deletions(-) diff --git a/flytepropeller/go.mod b/flytepropeller/go.mod index 353b4dbbcc..b857b95526 100644 --- a/flytepropeller/go.mod +++ b/flytepropeller/go.mod @@ -37,6 +37,7 @@ require ( k8s.io/apiextensions-apiserver v0.28.4 k8s.io/apimachinery v0.28.4 k8s.io/client-go v0.28.4 + k8s.io/code-generator v0.28.4 k8s.io/klog v1.0.0 k8s.io/utils v0.0.0-20230406110748-d93618cff8a2 sigs.k8s.io/controller-runtime v0.16.3 @@ -129,11 +130,13 @@ require ( go.opentelemetry.io/otel/metric v1.21.0 // indirect go.opentelemetry.io/otel/sdk v1.21.0 // indirect golang.org/x/crypto v0.21.0 // indirect + golang.org/x/mod v0.16.0 // indirect golang.org/x/net v0.23.0 // indirect golang.org/x/oauth2 v0.16.0 // indirect golang.org/x/sys v0.18.0 // indirect golang.org/x/term v0.18.0 // indirect golang.org/x/text v0.14.0 // indirect + golang.org/x/tools v0.19.0 // indirect gomodules.xyz/jsonpatch/v2 v2.4.0 // indirect google.golang.org/api v0.155.0 // indirect google.golang.org/appengine v1.6.8 // indirect @@ -145,6 +148,7 @@ require ( gopkg.in/yaml.v2 v2.4.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect k8s.io/component-base v0.28.4 // indirect + k8s.io/gengo v0.0.0-20230829151522-9cce18d56c01 // indirect k8s.io/klog/v2 v2.100.1 // indirect k8s.io/kube-openapi v0.0.0-20230717233707-2695361300d9 // indirect sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect @@ -160,6 +164,7 @@ replace ( k8s.io/api => k8s.io/api v0.28.2 k8s.io/apimachinery => k8s.io/apimachinery v0.28.2 k8s.io/client-go => k8s.io/client-go v0.28.2 + k8s.io/code-generator => k8s.io/code-generator v0.24.1 k8s.io/kube-openapi => k8s.io/kube-openapi v0.0.0-20230905202853-d090da108d2f sigs.k8s.io/controller-runtime => sigs.k8s.io/controller-runtime v0.16.2 ) diff --git a/flytepropeller/go.sum b/flytepropeller/go.sum index bc945124be..e1f6c2e10c 100644 --- a/flytepropeller/go.sum +++ b/flytepropeller/go.sum @@ -64,9 +64,13 @@ github.com/DiSiqueira/GoTree v1.0.1-0.20180907134536-53a8e837f295 h1:xJ0dAkuxJXf github.com/DiSiqueira/GoTree v1.0.1-0.20180907134536-53a8e837f295/go.mod h1:e0aH495YLkrsIe9fhedd6aSR6fgU/qhKvtroi6y7G/M= github.com/GoogleCloudPlatform/spark-on-k8s-operator v0.0.0-20200723154620-6f35a1152625 h1:cQyO5JQ2iuHnEcF3v24kdDMsgh04RjyFPDtuvD6PCE0= github.com/GoogleCloudPlatform/spark-on-k8s-operator v0.0.0-20200723154620-6f35a1152625/go.mod h1:6PnrZv6zUDkrNMw0mIoGRmGBR7i9LulhKPmxFq4rUiM= +github.com/NYTimes/gziphandler v0.0.0-20170623195520-56545f4a5d46/go.mod h1:3wb06e3pkSAbeQ52E9H9iFoQsEEwGN64994WTCIhntQ= github.com/OneOfOne/xxhash v1.2.2 h1:KMrpdQIwFcEqXDklaen+P1axHaj9BSKzvpUUfnHldSE= github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= +github.com/PuerkitoBio/purell v1.1.1/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= +github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE= github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= +github.com/asaskevich/govalidator v0.0.0-20190424111038-f61b66f89f4a/go.mod h1:lB+ZfQJz7igIIfQNfa7Ml4HSf2uFQQRzpGGRXenZAgY= github.com/aws/aws-sdk-go v1.44.2 h1:5VBk5r06bgxgRKVaUtm1/4NT/rtrnH2E4cnAYv5zgQc= github.com/aws/aws-sdk-go v1.44.2/go.mod h1:y4AeaBuwd2Lk+GepC1E9v0qOiTws0MIWAX4oIKwKHZo= github.com/aws/aws-sdk-go-v2 v1.0.0/go.mod h1:smfAbmpW+tcRVuNUjo3MOArSZmW72t62rkCzc2i0TWM= @@ -124,6 +128,9 @@ github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/dnaeon/go-vcr v1.2.0 h1:zHCHvJYTMh1N7xnV7zf1m1GPBF9Ad0Jk/whtQ1663qI= github.com/dnaeon/go-vcr v1.2.0/go.mod h1:R4UdLID7HZT3taECzJs4YgbbH6PIGXB6W/sc5OLb6RQ= +github.com/docopt/docopt-go v0.0.0-20180111231733-ee0de3bc6815/go.mod h1:WwZ+bS3ebgob9U8Nd0kOddGdZWjyMGR8Wziv+TBNwSE= +github.com/emicklei/go-restful v2.9.5+incompatible/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs= +github.com/emicklei/go-restful/v3 v3.8.0/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRry+4bhvbpWn3mrbc= github.com/emicklei/go-restful/v3 v3.12.0 h1:y2DdzBAURM29NFF94q6RaY4vjIH1rtwDapwQtU84iWk= github.com/emicklei/go-restful/v3 v3.12.0/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRry+4bhvbpWn3mrbc= github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= @@ -158,6 +165,7 @@ github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2 github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= github.com/go-logr/logr v0.1.0/go.mod h1:ixOQHD9gLJUVQQ2ZOR7zLEifBX6tGkNJF4QyIY7sIas= +github.com/go-logr/logr v0.2.0/go.mod h1:z6/tIYblkpsD+a4lm/fGIIU9mZ+XfAiaFtq7xTgseGU= github.com/go-logr/logr v1.2.0/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= github.com/go-logr/logr v1.3.0 h1:2y3SDp0ZXuc6/cjLSZ+Q3ir+QB9T/iG5yYRXqsagWSY= @@ -166,10 +174,15 @@ github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= github.com/go-logr/zapr v1.2.4 h1:QHVo+6stLbfJmYGkQ7uGHUCu5hnAFAj6mDe6Ea0SeOo= github.com/go-logr/zapr v1.2.4/go.mod h1:FyHWQIzQORZ0QVE1BtVHv3cKtNLuXsbNLtpuhNapBOA= +github.com/go-openapi/jsonpointer v0.19.3/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg= github.com/go-openapi/jsonpointer v0.19.6 h1:eCs3fxoIi3Wh6vtgmLTOjdhSpiqphQ+DaPn38N2ZdrE= github.com/go-openapi/jsonpointer v0.19.6/go.mod h1:osyAmYz/mB/C3I+WsTTSgw1ONzaLJoLCyoi6/zppojs= +github.com/go-openapi/jsonreference v0.19.5/go.mod h1:RdybgQwPxbL4UEjuAruzK1x3nE69AqPYEJeo/TWfEeg= +github.com/go-openapi/jsonreference v0.20.1/go.mod h1:Bl1zwGIM8/wsvqjsOQLJ/SH+En5Ap4rVB5KVcIDZG2k= github.com/go-openapi/jsonreference v0.20.2 h1:3sVjiK66+uXK/6oQ8xgcRKcFgQ5KXa2KvnJRumpMGbE= github.com/go-openapi/jsonreference v0.20.2/go.mod h1:Bl1zwGIM8/wsvqjsOQLJ/SH+En5Ap4rVB5KVcIDZG2k= +github.com/go-openapi/swag v0.19.5/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= +github.com/go-openapi/swag v0.19.14/go.mod h1:QYRuS/SOXUCsnplDa677K7+DxSOj6IPNl/eQntq43wQ= github.com/go-openapi/swag v0.22.3 h1:yMBqmnQ0gyZvEb/+KzuWZOXgllrXT4SADYbvDaXHv/g= github.com/go-openapi/swag v0.22.3/go.mod h1:UzaqsxGiab7freDnrUUra0MwWfN/q7tE4j+VcZ0yl14= github.com/go-redis/redis v6.15.7+incompatible h1:3skhDh95XQMpnqeqNftPkQD9jL9e5e36z/1SUm6dy1U= @@ -218,6 +231,7 @@ github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= +github.com/google/gnostic v0.5.7-v3refs/go.mod h1:73MKFl6jIHelAJNaBGFzt3SPtZULs9dYrGFt8OiIsHQ= github.com/google/gnostic-models v0.6.8 h1:yo/ABAfM5IMRsS1VnXjTBvUb61tFIHozhlYvRgGre9I= github.com/google/gnostic-models v0.6.8/go.mod h1:5n7qKqH0f5wFt+aWF8CW6pZLLNOfYuF5OpfBSENuI8U= github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= @@ -235,6 +249,7 @@ github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/ github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= +github.com/google/gofuzz v1.1.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/gofuzz v1.2.0 h1:xRy4A+RhZaiKjJ1bPfwQ8sedCA+YS2YcCHW6ec7JMi0= github.com/google/gofuzz v1.2.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/martian v2.1.0+incompatible h1:/CP5g8u/VJHijgedC/Legn3BAbAaWPgecwXBIDzw5no= @@ -253,6 +268,7 @@ github.com/google/pprof v0.0.0-20200708004538-1a94d8640e99/go.mod h1:ZgVRPoUq/hf github.com/google/pprof v0.0.0-20201023163331-3e6fc7fc9c4c/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20201203190320-1bf35d6f28c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20201218002935-b9804c9f04c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/pprof v0.0.0-20210407192527-94a9f03dee38/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1 h1:K6RDEckDVWvDI9JAJYCmNdQXq6neHJOYx3V6jnqNEec= github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= @@ -297,6 +313,7 @@ github.com/jmespath/go-jmespath/internal/testify v1.5.1 h1:shLQSRRSCCPj3f2gpwzGw github.com/jmespath/go-jmespath/internal/testify v1.5.1/go.mod h1:L3OGu8Wl2/fWfCI6z80xFu9LTZmf1ZRjMHUOPmWr69U= github.com/josharian/intern v1.0.0 h1:vlS4z54oSdjm0bgjRigI+G1HpF+tI+9rE5LLzOg8HmY= github.com/josharian/intern v1.0.0/go.mod h1:5DoeVV0s6jJacbCEi61lwdGj/aVlrQvzHFFd8Hwg//Y= +github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= @@ -307,6 +324,7 @@ github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxv github.com/kr/fs v0.1.0/go.mod h1:FFnZGqtBN9Gxj7eW1uZ42v5BccTP0vu6NEaFoC2HwRg= github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= +github.com/kr/pretty v0.2.0/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= @@ -322,6 +340,9 @@ github.com/kylelemons/godebug v1.1.0 h1:RPNrshWIDI6G2gRW9EHilWtl7Z6Sb1BR0xunSBf0 github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw= github.com/magiconair/properties v1.8.6 h1:5ibWZ6iY0NctNGWo87LalDlEZ6R41TqbbDamhfG/Qzo= github.com/magiconair/properties v1.8.6/go.mod h1:y3VJvCyxH9uVvJTWEGAELF3aiYNyPKd5NZ3oSwXrF60= +github.com/mailru/easyjson v0.0.0-20190614124828-94de47d64c63/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= +github.com/mailru/easyjson v0.0.0-20190626092158-b2ccc519800e/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= +github.com/mailru/easyjson v0.7.6/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc= github.com/mailru/easyjson v0.7.7 h1:UGYAvKxe3sBsEDzO8ZeWOSlIQfWFlxbzLZe7hwFURr0= github.com/mailru/easyjson v0.7.7/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc= github.com/mattn/go-colorable v0.1.9/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= @@ -338,23 +359,32 @@ github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RR github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= +github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M= github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= +github.com/munnerz/goautoneg v0.0.0-20120707110453-a547fc61f48d/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 h1:C3w9PqII01/Oq1c1nUAm88MOHcQC9l5mIlSMApZMrHA= github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= github.com/ncw/swift v1.0.53 h1:luHjjTNtekIEvHg5KdAFIBaH7bWfNkefwFnpDffSIks= github.com/ncw/swift v1.0.53/go.mod h1:23YIA4yWVnGwv2dQlN4bB7egfYX6YLn0Yo/S6zZO/ZM= +github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A= github.com/nxadm/tail v1.4.8 h1:nPr65rt6Y5JFSKQO7qToXr7pePgD6Gwiw05lkbyAQTE= github.com/nxadm/tail v1.4.8/go.mod h1:+ncqLTQzXmGhMZNUePPaPqPvBxHAIsmXswZKocGu+AU= github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk= +github.com/onsi/ginkgo v1.14.0/go.mod h1:iSB4RoI2tjJc9BBv4NKIKWKya62Rps+oPG/Lv9klQyY= +github.com/onsi/ginkgo v1.16.4/go.mod h1:dX+/inL/fNMqNlz0e9LfyB9TswhZpCVdJM/Z6Vvnwo0= github.com/onsi/ginkgo v1.16.5 h1:8xi0RTUf59SOSfEtZMvwTvXYMzG4gV23XVHOZiXNtnE= github.com/onsi/ginkgo v1.16.5/go.mod h1:+E8gABHa3K6zRBolWtd+ROzc/U5bkGt0FwiG042wbpU= +github.com/onsi/ginkgo/v2 v2.1.3/go.mod h1:vw5CSIxN1JObi/U8gcbwft7ZxR2dgaR70JSE3/PpL4c= +github.com/onsi/ginkgo/v2 v2.1.4/go.mod h1:um6tUpWM/cxCK3/FK8BXqEiUMUwRgSM4JXG47RKZmLU= github.com/onsi/ginkgo/v2 v2.11.0 h1:WgqUCUt/lT6yXoQ8Wef0fsNn5cAuMK7+KT9UFRz2tcU= github.com/onsi/ginkgo/v2 v2.11.0/go.mod h1:ZhrRA5XmEE3x3rhlzamx/JJvujdZoJ2uvgI7kR0iZvM= github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY= github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo= +github.com/onsi/gomega v1.17.0/go.mod h1:HnhC7FXeEQY45zxNK3PPoIUhzk/80Xly9PcubAlGdZY= +github.com/onsi/gomega v1.19.0/go.mod h1:LY+I3pBVzYsTBU1AnDwOSxaYi9WoWiqgwooUqq9yPro= github.com/onsi/gomega v1.27.10 h1:naR28SdDFlqrG6kScpT8VWpu1xWY5nJRCF3XaYyBjhI= github.com/onsi/gomega v1.27.10/go.mod h1:RsS8tutOdbdgzbPtzzATp12yT7kM5I5aElG3evPbQ0M= github.com/opentracing/opentracing-go v1.1.0/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= @@ -391,6 +421,7 @@ github.com/sirupsen/logrus v1.9.3 h1:dueUQJ1C2q9oE3F7wvmSGAaVtTmUizReu6fjN8uqzbQ github.com/sirupsen/logrus v1.9.3/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72 h1:qLC7fQah7D6K1B0ujays3HV9gkFtllcxhzImRR7ArPQ= github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= +github.com/spf13/afero v1.2.2/go.mod h1:9ZxEEn6pIJ8Rxe320qSDBk6AsU0r9pR7Q4OcevTdifk= github.com/spf13/afero v1.9.2 h1:j49Hj62F0n+DaZ1dDCvhABaPNSGNkt32oRFxI33IEMw= github.com/spf13/afero v1.9.2/go.mod h1:iUV7ddyEEZPO5gA3zD4fJt6iStLlL+Lg4m2cihcDf8Y= github.com/spf13/cast v1.4.1 h1:s0hze+J0196ZfEMTs80N7UlFt0BDuQ7Q+JDnHiMWKdA= @@ -403,6 +434,7 @@ github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= github.com/spf13/viper v1.11.0 h1:7OX/1FS6n7jHD1zGrZTM7WtY13ZELRyosK4k93oPr44= github.com/spf13/viper v1.11.0/go.mod h1:djo0X/bA5+tYVoCn+C7cAYJGcVn/qYLFTG8gdUsX7Zk= +github.com/stoewer/go-strcase v1.2.0/go.mod h1:IBiWB2sKIp3wVVQ3Y035++gc+knqhUQag1KpM8ahLw8= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= @@ -413,6 +445,7 @@ github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXf github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= +github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= @@ -425,6 +458,7 @@ github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9de github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +github.com/yuin/goldmark v1.4.1/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= @@ -505,7 +539,11 @@ golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.1/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.6.0-dev.0.20220106191415-9b9b3d81d5e3/go.mod h1:3p9vT2HGsQu2K1YbXdKPJLVgG5VJdoTa1poYQBtP1AY= golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= +golang.org/x/mod v0.7.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= +golang.org/x/mod v0.16.0 h1:QX4fJ0Rr5cPQCF7O9lh9Se4pmwfwskqZfq5moyldzic= +golang.org/x/mod v0.16.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -519,6 +557,7 @@ golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190628185345-da137c7871d7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190724013045-ca1201d0de80/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20190827160401-ba9fcec4b297/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20191209160850-c0dbc17a3553/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200114155413-6afb5195e5aa/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200202094626-16171245cfb2/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= @@ -541,8 +580,13 @@ golang.org/x/net v0.0.0-20201209123823-ac852fbbde11/go.mod h1:m0MpNAwzfU5UDzcl9v golang.org/x/net v0.0.0-20201224014010-6772e930b67b/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= +golang.org/x/net v0.0.0-20210428140749-89ef3d95e781/go.mod h1:OJAsFXCWl8Ukc7SiCT/9KSuxbyM7479/AVlXFRxuMCk= +golang.org/x/net v0.0.0-20211015210444-4f30a5c0130f/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= +golang.org/x/net v0.0.0-20220225172249-27dd8689420f/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= +golang.org/x/net v0.3.0/go.mod h1:MBQ8lrhLObU/6UmLb4fmbmk5OcyYmqtbGd/9yIeKjEE= +golang.org/x/net v0.7.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= golang.org/x/net v0.23.0 h1:7EYJ93RZ9vYSZAIb2x3lnuvqO5zneoD6IvWjuhfxjTs= golang.org/x/net v0.23.0/go.mod h1:JKghWKKOSdJwpW2GEx0Ja7fmaKnMsbu+MWVZTokSYmg= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= @@ -567,7 +611,9 @@ golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.6.0 h1:5BMeUDZ7vkXGfEr1x9B4bRcTH4lpkTkpdh0T/J+qjbQ= golang.org/x/sync v0.6.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -599,6 +645,7 @@ golang.org/x/sys v0.0.0-20200331124033-c3d80250170d/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20200501052902-10377860bb8e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200511232937-7e40ca221e25/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200515095857-1151b9dac4a9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200519105757-fe76b779f299/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200523222454-059865788121/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200803210538-64077c9b5642/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200905004654-be1d3432aa8f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -610,22 +657,30 @@ golang.org/x/sys v0.0.0-20210112080510-489259a85091/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210225134936-a50acf3fe073/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210423185535-09eb48e85fd7/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210616045830-e2b7044e8c71/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20211019181941-9d821ace8654/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220209214540-3681064d5158/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220319134239-a9b59b0215f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220908164124-27713097b956/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.3.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.18.0 h1:DBdB3niSjOA/O0blCZBqDefyWNYveAYMNF1Wum0DYQ4= golang.org/x/sys v0.18.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= +golang.org/x/term v0.3.0/go.mod h1:q750SLmJuPmVoN1blW3UFBPREJfb1KmY3vwxfr+nFDA= +golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k= golang.org/x/term v0.18.0 h1:FcHjZXDMxI8mM3nwhX9HlKop4C0YQvCVCdwYl2wOtE8= golang.org/x/term v0.18.0/go.mod h1:ILwASektA3OnRv7amZ1xhE/KTR+u50pbXfZ03+6Nx58= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -635,8 +690,11 @@ golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= golang.org/x/text v0.3.8/go.mod h1:E6s5w1FMmriuDzIBO73fBruAKo1PCIq6d2Q6DHfQ8WQ= +golang.org/x/text v0.5.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= +golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ= golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= @@ -678,6 +736,7 @@ golang.org/x/tools v0.0.0-20200304193943-95d2e580d8eb/go.mod h1:o4KQGtdN14AW+yjs golang.org/x/tools v0.0.0-20200312045724-11d5b4c81c7d/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= golang.org/x/tools v0.0.0-20200331025713-a30bf2db82d4/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8= golang.org/x/tools v0.0.0-20200501065659-ab2804fb9c9d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200505023115-26f46d2f7ef8/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200512131952-2bc93b1c0c88/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200515010526-7d3b6ebf133d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200618134242-20370b0cb4b2/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= @@ -694,7 +753,10 @@ golang.org/x/tools v0.0.0-20210105154028-b0ab187a4818/go.mod h1:emZCQorbCU4vsT4f golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20210108195828-e2f9c7f1fc8e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0= +golang.org/x/tools v0.1.10-0.20220218145154-897bd77cd717/go.mod h1:Uh6Zz+xoGYZom868N8YTex3t7RhtHDBrE8Gzo9bV56E= +golang.org/x/tools v0.1.10/go.mod h1:Uh6Zz+xoGYZom868N8YTex3t7RhtHDBrE8Gzo9bV56E= golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= +golang.org/x/tools v0.4.0/go.mod h1:UE5sM2OK9E/d67R0ANs2xJizIymRP5gJU295PvKXxjQ= golang.org/x/tools v0.19.0 h1:tfGCXNR1OsFG+sVdLAitlpjAvD/I6dHDKnYrpEZUHkw= golang.org/x/tools v0.19.0/go.mod h1:qoJWxmGSIBmAeriMx19ogtrEPrGtDbPK634QFIcLAhc= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= @@ -767,6 +829,7 @@ google.golang.org/genproto v0.0.0-20200729003335-053ba62fc06f/go.mod h1:FWY/as6D google.golang.org/genproto v0.0.0-20200804131852-c06518451d9c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20200825200019-8632dd797987/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20200904004341-0bd0a958aa1d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20201019141844-1ed22bb0c154/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20201109203340-2640f1f9cdfb/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20201201144952-b05cb90ed32e/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20201210142538-e3217bee35cc/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= @@ -819,6 +882,8 @@ google.golang.org/protobuf v1.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGm google.golang.org/protobuf v1.33.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= @@ -837,6 +902,8 @@ gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gopkg.in/yaml.v3 v3.0.0-20200615113413-eeeca48fe776/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.0/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= @@ -857,16 +924,23 @@ k8s.io/apimachinery v0.28.2 h1:KCOJLrc6gu+wV1BYgwik4AF4vXOlVJPdiqn0yAWWwXQ= k8s.io/apimachinery v0.28.2/go.mod h1:RdzF87y/ngqk9H4z3EL2Rppv5jj95vGS/HaFXrLDApU= k8s.io/client-go v0.28.2 h1:DNoYI1vGq0slMBN/SWKMZMw0Rq+0EQW6/AK4v9+3VeY= k8s.io/client-go v0.28.2/go.mod h1:sMkApowspLuc7omj1FOSUxSoqjr+d5Q0Yc0LOFnYFJY= -k8s.io/code-generator v0.28.4 h1:tcOSNIZQvuAvXhOwpbuJkKbAABJQeyCcQBCN/3uI18c= -k8s.io/code-generator v0.28.4/go.mod h1:OQAfl6bZikQ/tK6faJ18Vyzo54rUII2NmjurHyiN1g4= +k8s.io/code-generator v0.24.1 h1:zS+dvmUNaOcvsQ4faV9hXNjsKG9/pQaLnts1Wma4RM8= +k8s.io/code-generator v0.24.1/go.mod h1:dpVhs00hTuTdTY6jvVxvTFCk6gSMrtfRydbhZwHI15w= k8s.io/component-base v0.28.4 h1:c/iQLWPdUgI90O+T9TeECg8o7N3YJTiuz2sKxILYcYo= k8s.io/component-base v0.28.4/go.mod h1:m9hR0uvqXDybiGL2nf/3Lf0MerAfQXzkfWhUY58JUbU= +k8s.io/gengo v0.0.0-20211129171323-c02415ce4185/go.mod h1:FiNAH4ZV3gBg2Kwh89tzAEV2be7d5xI0vBa/VySYy3E= +k8s.io/gengo v0.0.0-20230829151522-9cce18d56c01 h1:pWEwq4Asjm4vjW7vcsmijwBhOr1/shsbSYiWXmNGlks= +k8s.io/gengo v0.0.0-20230829151522-9cce18d56c01/go.mod h1:FiNAH4ZV3gBg2Kwh89tzAEV2be7d5xI0vBa/VySYy3E= k8s.io/klog v1.0.0 h1:Pt+yjF5aB1xDSVbau4VsWe+dQNzA0qv1LlXdC2dF6Q8= k8s.io/klog v1.0.0/go.mod h1:4Bi6QPql/J/LkTDqv7R/cd3hPo4k2DG6Ptcz060Ez5I= +k8s.io/klog/v2 v2.0.0/go.mod h1:PBfzABfn139FHAV07az/IF9Wp1bkk3vpT2XSJ76fSDE= +k8s.io/klog/v2 v2.2.0/go.mod h1:Od+F08eJP+W3HUb4pSrPpgp9DGU4GzlpG/TmITuYh/Y= +k8s.io/klog/v2 v2.60.1/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0= k8s.io/klog/v2 v2.100.1 h1:7WCHKK6K8fNhTqfBhISHQ97KrnJNFZMcQvKp7gP/tmg= k8s.io/klog/v2 v2.100.1/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0= k8s.io/kube-openapi v0.0.0-20230905202853-d090da108d2f h1:eeEUOoGYWhOz7EyXqhlR2zHKNw2mNJ9vzJmub6YN6kk= k8s.io/kube-openapi v0.0.0-20230905202853-d090da108d2f/go.mod h1:AsvuZPBlUDVuCdzJ87iajxtXuR9oktsTctW/R9wwouA= +k8s.io/utils v0.0.0-20210802155522-efc7438f0176/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= k8s.io/utils v0.0.0-20230406110748-d93618cff8a2 h1:qY1Ad8PODbnymg2pRbkyMT/ylpTrCM8P2RJ0yroCyIk= k8s.io/utils v0.0.0-20230406110748-d93618cff8a2/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= @@ -876,7 +950,9 @@ sigs.k8s.io/controller-runtime v0.16.2 h1:mwXAVuEk3EQf478PQwQ48zGOXvW27UJc8NHktQ sigs.k8s.io/controller-runtime v0.16.2/go.mod h1:vpMu3LpI5sYWtujJOa2uPK61nB5rbwlN7BAB8aSLvGU= sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd h1:EDPBXCAspyGV4jQlpZSudPeMmr1bNJefnuqLsRAsHZo= sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd/go.mod h1:B8JuhiUyNFVKdsE8h686QcCxMaH6HrOAZj4vswFpcB0= +sigs.k8s.io/structured-merge-diff/v4 v4.2.1/go.mod h1:j/nl6xW8vLS49O8YvXW1ocPhZawJtm+Yrr7PPRQ0Vg4= sigs.k8s.io/structured-merge-diff/v4 v4.2.3 h1:PRbqxJClWWYMNV1dhaG4NsibJbArud9kFxnAMREiWFE= sigs.k8s.io/structured-merge-diff/v4 v4.2.3/go.mod h1:qjx8mGObPmV2aSZepjQjbmb2ihdVs8cGKBraizNC69E= +sigs.k8s.io/yaml v1.2.0/go.mod h1:yfXDCHCao9+ENCvLSE62v9VSji2MKu5jeNfTrofGhJc= sigs.k8s.io/yaml v1.3.0 h1:a2VclLzOGrwOHDiV8EfBGhvjHvP46CtW5j6POvhYGGo= sigs.k8s.io/yaml v1.3.0/go.mod h1:GeOyir5tyXNByN85N/dRIT9es5UQNerPYEKK56eTBm8= diff --git a/flytepropeller/hack/tools.go b/flytepropeller/hack/tools.go index 5b96173b64..0032e546da 100644 --- a/flytepropeller/hack/tools.go +++ b/flytepropeller/hack/tools.go @@ -2,4 +2,4 @@ package tools // Uncomment this to make code-generator work -// import _ "k8s.io/code-generator" +import _ "k8s.io/code-generator" From 161a1f6613d5e2ef3d9b7da9f0982abf5b377da2 Mon Sep 17 00:00:00 2001 From: Eduardo Apolinario Date: Wed, 29 May 2024 16:55:03 -0700 Subject: [PATCH 03/19] Implement `DeepCopyInto` for structs that have proto fields Signed-off-by: Eduardo Apolinario --- .../pkg/apis/flyteworkflow/v1alpha1/branch.go | 28 ++ .../pkg/apis/flyteworkflow/v1alpha1/gate.go | 13 + .../flyteworkflow/v1alpha1/node_status.go | 111 +++++ .../apis/flyteworkflow/v1alpha1/workflow.go | 70 +++ .../flyteworkflow/v1alpha1/workflow_status.go | 43 ++ .../v1alpha1/zz_generated.deepcopy.go | 424 ++++++++---------- .../client/clientset/versioned/clientset.go | 38 +- .../versioned/fake/clientset_generated.go | 5 +- .../v1alpha1/fake/fake_flyteworkflow.go | 2 +- .../v1alpha1/flyteworkflow_client.go | 20 +- 10 files changed, 516 insertions(+), 238 deletions(-) diff --git a/flytepropeller/pkg/apis/flyteworkflow/v1alpha1/branch.go b/flytepropeller/pkg/apis/flyteworkflow/v1alpha1/branch.go index 37a54dfffe..51c00b573a 100644 --- a/flytepropeller/pkg/apis/flyteworkflow/v1alpha1/branch.go +++ b/flytepropeller/pkg/apis/flyteworkflow/v1alpha1/branch.go @@ -4,6 +4,7 @@ import ( "bytes" "github.com/golang/protobuf/jsonpb" + "google.golang.org/protobuf/proto" "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/core" ) @@ -56,6 +57,33 @@ type BranchNodeSpec struct { ElseFail *core.Error `json:"elseFail,omitempty"` } +// BranchNodeSpec contains at least one proto message directly, which means that we need to +// implement DeepCopyInto since the generated proto messages do not implement that function. +func (in *BranchNodeSpec) DeepCopyInto(out *BranchNodeSpec) { + *out = *in + in.If.DeepCopyInto(&out.If) + if in.ElseIf != nil { + in, out := &in.ElseIf, &out.ElseIf + *out = make([]*IfBlock, len(*in)) + for i := range *in { + if (*in)[i] != nil { + in, out := &(*in)[i], &(*out)[i] + *out = new(IfBlock) + (*in).DeepCopyInto(*out) + } + } + } + if in.Else != nil { + in, out := &in.Else, &out.Else + *out = new(string) + **out = **in + } + if in.ElseFail != nil { + out.ElseFail = proto.Clone(in.ElseFail).(*core.Error) + } + return +} + func (in *BranchNodeSpec) GetIf() ExecutableIfBlock { return &in.If } diff --git a/flytepropeller/pkg/apis/flyteworkflow/v1alpha1/gate.go b/flytepropeller/pkg/apis/flyteworkflow/v1alpha1/gate.go index a7ffa799fa..4615580d81 100644 --- a/flytepropeller/pkg/apis/flyteworkflow/v1alpha1/gate.go +++ b/flytepropeller/pkg/apis/flyteworkflow/v1alpha1/gate.go @@ -4,6 +4,7 @@ import ( "bytes" "github.com/golang/protobuf/jsonpb" + "google.golang.org/protobuf/proto" "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/core" ) @@ -36,6 +37,10 @@ func (in ApproveCondition) MarshalJSON() ([]byte, error) { return buf.Bytes(), nil } +func (in *ApproveCondition) DeepCopyInto(out *ApproveCondition) { + out.ApproveCondition = proto.Clone(in.ApproveCondition).(*core.ApproveCondition) +} + func (in *ApproveCondition) UnmarshalJSON(b []byte) error { in.ApproveCondition = &core.ApproveCondition{} return jsonpb.Unmarshal(bytes.NewReader(b), in.ApproveCondition) @@ -62,6 +67,10 @@ func (in *SignalCondition) UnmarshalJSON(b []byte) error { return jsonpb.Unmarshal(bytes.NewReader(b), in.SignalCondition) } +func (in *SignalCondition) DeepCopyInto(out *SignalCondition) { + out.SignalCondition = proto.Clone(in.SignalCondition).(*core.SignalCondition) +} + type SleepCondition struct { *core.SleepCondition } @@ -83,6 +92,10 @@ func (in *SleepCondition) UnmarshalJSON(b []byte) error { return jsonpb.Unmarshal(bytes.NewReader(b), in.SleepCondition) } +func (in *SleepCondition) DeepCopyInto(out *SleepCondition) { + out.SleepCondition = proto.Clone(in.SleepCondition).(*core.SleepCondition) +} + type GateNodeSpec struct { Kind ConditionKind `json:"kind"` Approve *ApproveCondition `json:"approve,omitempty"` diff --git a/flytepropeller/pkg/apis/flyteworkflow/v1alpha1/node_status.go b/flytepropeller/pkg/apis/flyteworkflow/v1alpha1/node_status.go index aab034224d..7ee776b0e2 100644 --- a/flytepropeller/pkg/apis/flyteworkflow/v1alpha1/node_status.go +++ b/flytepropeller/pkg/apis/flyteworkflow/v1alpha1/node_status.go @@ -9,6 +9,7 @@ import ( "strconv" "time" + "google.golang.org/protobuf/proto" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/core" @@ -174,6 +175,15 @@ type WorkflowNodeStatus struct { ExecutionError *core.ExecutionError `json:"executionError,omitempty"` } +func (in *WorkflowNodeStatus) DeepCopyInto(out *WorkflowNodeStatus) { + *out = *in + out.MutableStruct = in.MutableStruct + if in.ExecutionError != nil { + out.ExecutionError = proto.Clone(in.ExecutionError).(*core.ExecutionError) + } + return +} + func (in *WorkflowNodeStatus) SetExecutionError(executionError *core.ExecutionError) { if in.ExecutionError != executionError { in.SetDirty() @@ -239,6 +249,21 @@ type ArrayNodeStatus struct { TaskPhaseVersion uint32 `json:"taskPhaseVersion,omitempty"` } +// ArrayNodeStatus contains at least one proto message directly, which means that we need to +// implement DeepCopyInto since the generated proto messages do not implement that function. +func (in *ArrayNodeStatus) DeepCopyInto(out *ArrayNodeStatus) { + *out = *in + out.MutableStruct = in.MutableStruct + if in.ExecutionError != nil { + out.ExecutionError = proto.Clone(in.ExecutionError).(*core.ExecutionError) + } + in.SubNodePhases.DeepCopyInto(&out.SubNodePhases) + in.SubNodeTaskPhases.DeepCopyInto(&out.SubNodeTaskPhases) + in.SubNodeRetryAttempts.DeepCopyInto(&out.SubNodeRetryAttempts) + in.SubNodeSystemFailures.DeepCopyInto(&out.SubNodeSystemFailures) + return +} + func (in *ArrayNodeStatus) GetArrayNodePhase() ArrayNodePhase { return in.Phase } @@ -352,6 +377,92 @@ type NodeStatus struct { DataReferenceConstructor storage.ReferenceConstructor `json:"-"` } +// TODO: add comment +func (in *NodeStatus) DeepCopyInto(out *NodeStatus) { + *out = *in + out.MutableStruct = in.MutableStruct + if in.QueuedAt != nil { + in, out := &in.QueuedAt, &out.QueuedAt + *out = (*in).DeepCopy() + } + if in.StartedAt != nil { + in, out := &in.StartedAt, &out.StartedAt + *out = (*in).DeepCopy() + } + if in.StoppedAt != nil { + in, out := &in.StoppedAt, &out.StoppedAt + *out = (*in).DeepCopy() + } + if in.LastUpdatedAt != nil { + in, out := &in.LastUpdatedAt, &out.LastUpdatedAt + *out = (*in).DeepCopy() + } + if in.LastAttemptStartedAt != nil { + in, out := &in.LastAttemptStartedAt, &out.LastAttemptStartedAt + *out = (*in).DeepCopy() + } + if in.ParentNode != nil { + in, out := &in.ParentNode, &out.ParentNode + *out = new(string) + **out = **in + } + if in.ParentTask != nil { + in, out := &in.ParentTask, &out.ParentTask + *out = (*in).DeepCopy() + } + if in.BranchStatus != nil { + in, out := &in.BranchStatus, &out.BranchStatus + *out = new(BranchNodeStatus) + (*in).DeepCopyInto(*out) + } + if in.SubNodeStatus != nil { + in, out := &in.SubNodeStatus, &out.SubNodeStatus + *out = make(map[string]*NodeStatus, len(*in)) + for key, val := range *in { + var outVal *NodeStatus + if val == nil { + (*out)[key] = nil + } else { + in, out := &val, &outVal + *out = new(NodeStatus) + (*in).DeepCopyInto(*out) + } + (*out)[key] = outVal + } + } + if in.WorkflowNodeStatus != nil { + in, out := &in.WorkflowNodeStatus, &out.WorkflowNodeStatus + *out = new(WorkflowNodeStatus) + (*in).DeepCopyInto(*out) + } + if in.TaskNodeStatus != nil { + in, out := &in.TaskNodeStatus, &out.TaskNodeStatus + *out = (*in).DeepCopy() + } + if in.DynamicNodeStatus != nil { + in, out := &in.DynamicNodeStatus, &out.DynamicNodeStatus + *out = new(DynamicNodeStatus) + (*in).DeepCopyInto(*out) + } + if in.GateNodeStatus != nil { + in, out := &in.GateNodeStatus, &out.GateNodeStatus + *out = new(GateNodeStatus) + **out = **in + } + if in.ArrayNodeStatus != nil { + in, out := &in.ArrayNodeStatus, &out.ArrayNodeStatus + *out = (*in).DeepCopy() + } + if in.Error != nil { + in, out := &in.Error, &out.Error + *out = (*in).DeepCopy() + } + if in.DataReferenceConstructor != nil { + out.DataReferenceConstructor = in.DataReferenceConstructor + } + return +} + func (in *NodeStatus) IsDirty() bool { isDirty := in.MutableStruct.IsDirty() || (in.TaskNodeStatus != nil && in.TaskNodeStatus.IsDirty()) || diff --git a/flytepropeller/pkg/apis/flyteworkflow/v1alpha1/workflow.go b/flytepropeller/pkg/apis/flyteworkflow/v1alpha1/workflow.go index 225a49ac3f..e3e19931a1 100644 --- a/flytepropeller/pkg/apis/flyteworkflow/v1alpha1/workflow.go +++ b/flytepropeller/pkg/apis/flyteworkflow/v1alpha1/workflow.go @@ -79,6 +79,76 @@ type FlyteWorkflow struct { WorkflowClosureReference DataReference `json:"workflowClosureReference,omitempty"` } +// FlyteWorkflow contains at least one proto message directly, which means that we need to +// implement DeepCopyInto since the generated proto messages do not implement that function. +func (in *FlyteWorkflow) DeepCopyInto(out *FlyteWorkflow) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + if in.WorkflowSpec != nil { + in, out := &in.WorkflowSpec, &out.WorkflowSpec + *out = new(WorkflowSpec) + (*in).DeepCopyInto(*out) + } + if in.WorkflowMeta != nil { + in, out := &in.WorkflowMeta, &out.WorkflowMeta + *out = new(WorkflowMeta) + **out = **in + } + if in.Inputs != nil { + in, out := &in.Inputs, &out.Inputs + *out = (*in).DeepCopy() + } + in.ExecutionID.DeepCopyInto(&out.ExecutionID) + if in.Tasks != nil { + in, out := &in.Tasks, &out.Tasks + *out = make(map[string]*TaskSpec, len(*in)) + for key, val := range *in { + var outVal *TaskSpec + if val == nil { + (*out)[key] = nil + } else { + in, out := &val, &outVal + *out = (*in).DeepCopy() + } + (*out)[key] = outVal + } + } + if in.SubWorkflows != nil { + in, out := &in.SubWorkflows, &out.SubWorkflows + *out = make(map[string]*WorkflowSpec, len(*in)) + for key, val := range *in { + var outVal *WorkflowSpec + if val == nil { + (*out)[key] = nil + } else { + in, out := &val, &outVal + *out = new(WorkflowSpec) + (*in).DeepCopyInto(*out) + } + (*out)[key] = outVal + } + } + if in.ActiveDeadlineSeconds != nil { + in, out := &in.ActiveDeadlineSeconds, &out.ActiveDeadlineSeconds + *out = new(int64) + **out = **in + } + out.NodeDefaults = in.NodeDefaults + if in.AcceptedAt != nil { + in, out := &in.AcceptedAt, &out.AcceptedAt + *out = (*in).DeepCopy() + } + out.SecurityContext = in.SecurityContext + in.Status.DeepCopyInto(&out.Status) + in.RawOutputDataConfig.DeepCopyInto(&out.RawOutputDataConfig) + in.ExecutionConfig.DeepCopyInto(&out.ExecutionConfig) + if in.DataReferenceConstructor != nil { + out.DataReferenceConstructor = in.DataReferenceConstructor + } + return +} + func (in *FlyteWorkflow) GetSecurityContext() core.SecurityContext { return in.SecurityContext } diff --git a/flytepropeller/pkg/apis/flyteworkflow/v1alpha1/workflow_status.go b/flytepropeller/pkg/apis/flyteworkflow/v1alpha1/workflow_status.go index db6175cadf..613dca4414 100644 --- a/flytepropeller/pkg/apis/flyteworkflow/v1alpha1/workflow_status.go +++ b/flytepropeller/pkg/apis/flyteworkflow/v1alpha1/workflow_status.go @@ -45,6 +45,49 @@ type WorkflowStatus struct { DataReferenceConstructor storage.ReferenceConstructor `json:"-"` } +func (in *WorkflowStatus) DeepCopyInto(out *WorkflowStatus) { + *out = *in + if in.StartedAt != nil { + in, out := &in.StartedAt, &out.StartedAt + *out = (*in).DeepCopy() + } + if in.StoppedAt != nil { + in, out := &in.StoppedAt, &out.StoppedAt + *out = (*in).DeepCopy() + } + if in.LastUpdatedAt != nil { + in, out := &in.LastUpdatedAt, &out.LastUpdatedAt + *out = (*in).DeepCopy() + } + if in.NodeStatus != nil { + in, out := &in.NodeStatus, &out.NodeStatus + *out = make(map[string]*NodeStatus, len(*in)) + for key, val := range *in { + var outVal *NodeStatus + if val == nil { + (*out)[key] = nil + } else { + in, out := &val, &outVal + *out = (*in).DeepCopy() + } + (*out)[key] = outVal + } + } + if in.Error != nil { + in, out := &in.Error, &out.Error + *out = (*in).DeepCopy() + } + if in.DefinitionVersion != nil { + in, out := &in.DefinitionVersion, &out.DefinitionVersion + *out = new(WorkflowDefinitionVersion) + **out = **in + } + if in.DataReferenceConstructor != nil { + out.DataReferenceConstructor = in.DataReferenceConstructor + } + return +} + func IsWorkflowPhaseTerminal(p WorkflowPhase) bool { return p == WorkflowPhaseFailed || p == WorkflowPhaseSuccess || p == WorkflowPhaseAborted } diff --git a/flytepropeller/pkg/apis/flyteworkflow/v1alpha1/zz_generated.deepcopy.go b/flytepropeller/pkg/apis/flyteworkflow/v1alpha1/zz_generated.deepcopy.go index febbca733c..6e1fee9c69 100644 --- a/flytepropeller/pkg/apis/flyteworkflow/v1alpha1/zz_generated.deepcopy.go +++ b/flytepropeller/pkg/apis/flyteworkflow/v1alpha1/zz_generated.deepcopy.go @@ -6,7 +6,6 @@ package v1alpha1 import ( - core "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/core" v1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" @@ -22,6 +21,62 @@ func (in *Alias) DeepCopy() *Alias { return out } +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ApproveCondition. +func (in *ApproveCondition) DeepCopy() *ApproveCondition { + if in == nil { + return nil + } + out := new(ApproveCondition) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ArrayNodeSpec) DeepCopyInto(out *ArrayNodeSpec) { + *out = *in + if in.SubNodeSpec != nil { + in, out := &in.SubNodeSpec, &out.SubNodeSpec + *out = new(NodeSpec) + (*in).DeepCopyInto(*out) + } + if in.Parallelism != nil { + in, out := &in.Parallelism, &out.Parallelism + *out = new(uint32) + **out = **in + } + if in.MinSuccesses != nil { + in, out := &in.MinSuccesses, &out.MinSuccesses + *out = new(uint32) + **out = **in + } + if in.MinSuccessRatio != nil { + in, out := &in.MinSuccessRatio, &out.MinSuccessRatio + *out = new(float32) + **out = **in + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ArrayNodeSpec. +func (in *ArrayNodeSpec) DeepCopy() *ArrayNodeSpec { + if in == nil { + return nil + } + out := new(ArrayNodeSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ArrayNodeStatus. +func (in *ArrayNodeStatus) DeepCopy() *ArrayNodeStatus { + if in == nil { + return nil + } + out := new(ArrayNodeStatus) + in.DeepCopyInto(out) + return out +} + // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Binding. func (in *Binding) DeepCopy() *Binding { if in == nil { @@ -42,33 +97,6 @@ func (in *BooleanExpression) DeepCopy() *BooleanExpression { return out } -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *BranchNodeSpec) DeepCopyInto(out *BranchNodeSpec) { - *out = *in - in.If.DeepCopyInto(&out.If) - if in.ElseIf != nil { - in, out := &in.ElseIf, &out.ElseIf - *out = make([]*IfBlock, len(*in)) - for i := range *in { - if (*in)[i] != nil { - in, out := &(*in)[i], &(*out)[i] - *out = new(IfBlock) - (*in).DeepCopyInto(*out) - } - } - } - if in.Else != nil { - in, out := &in.Else, &out.Else - *out = new(string) - **out = **in - } - if in.ElseFail != nil { - in, out := &in.ElseFail, &out.ElseFail - *out = *in - } - return -} - // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BranchNodeSpec. func (in *BranchNodeSpec) DeepCopy() *BranchNodeSpec { if in == nil { @@ -152,7 +180,20 @@ func (in *ExecutionConfig) DeepCopyInto(out *ExecutionConfig) { (*out)[key] = *val.DeepCopy() } } - out.MaxParallelism = in.MaxParallelism + in.RecoveryExecution.DeepCopyInto(&out.RecoveryExecution) + in.TaskResources.DeepCopyInto(&out.TaskResources) + if in.Interruptible != nil { + in, out := &in.Interruptible, &out.Interruptible + *out = new(bool) + **out = **in + } + if in.EnvironmentVariables != nil { + in, out := &in.EnvironmentVariables, &out.EnvironmentVariables + *out = make(map[string]string, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } return } @@ -176,74 +217,14 @@ func (in *ExecutionError) DeepCopy() *ExecutionError { return out } -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *FlyteWorkflow) DeepCopyInto(out *FlyteWorkflow) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - if in.WorkflowSpec != nil { - in, out := &in.WorkflowSpec, &out.WorkflowSpec - *out = new(WorkflowSpec) - (*in).DeepCopyInto(*out) - } - if in.WorkflowMeta != nil { - in, out := &in.WorkflowMeta, &out.WorkflowMeta - *out = new(WorkflowMeta) - **out = **in - } - if in.Inputs != nil { - in, out := &in.Inputs, &out.Inputs - *out = (*in).DeepCopy() - } - in.ExecutionID.DeepCopyInto(&out.ExecutionID) - if in.Tasks != nil { - in, out := &in.Tasks, &out.Tasks - *out = make(map[string]*TaskSpec, len(*in)) - for key, val := range *in { - var outVal *TaskSpec - if val == nil { - (*out)[key] = nil - } else { - in, out := &val, &outVal - *out = (*in).DeepCopy() - } - (*out)[key] = outVal - } - } - if in.SubWorkflows != nil { - in, out := &in.SubWorkflows, &out.SubWorkflows - *out = make(map[string]*WorkflowSpec, len(*in)) - for key, val := range *in { - var outVal *WorkflowSpec - if val == nil { - (*out)[key] = nil - } else { - in, out := &val, &outVal - *out = new(WorkflowSpec) - (*in).DeepCopyInto(*out) - } - (*out)[key] = outVal - } - } - if in.ActiveDeadlineSeconds != nil { - in, out := &in.ActiveDeadlineSeconds, &out.ActiveDeadlineSeconds - *out = new(int64) - **out = **in - } - out.NodeDefaults = in.NodeDefaults - if in.AcceptedAt != nil { - in, out := &in.AcceptedAt, &out.AcceptedAt - *out = (*in).DeepCopy() - } - - out.SecurityContext = in.SecurityContext - in.Status.DeepCopyInto(&out.Status) - in.RawOutputDataConfig.DeepCopyInto(&out.RawOutputDataConfig) - in.ExecutionConfig.DeepCopyInto(&out.ExecutionConfig) - if in.DataReferenceConstructor != nil { - out.DataReferenceConstructor = in.DataReferenceConstructor +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ExtendedResources. +func (in *ExtendedResources) DeepCopy() *ExtendedResources { + if in == nil { + return nil } - return + out := new(ExtendedResources) + in.DeepCopyInto(out) + return out } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FlyteWorkflow. @@ -297,6 +278,51 @@ func (in *FlyteWorkflowList) DeepCopyObject() runtime.Object { return nil } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *GateNodeSpec) DeepCopyInto(out *GateNodeSpec) { + *out = *in + if in.Approve != nil { + in, out := &in.Approve, &out.Approve + *out = (*in).DeepCopy() + } + if in.Signal != nil { + in, out := &in.Signal, &out.Signal + *out = (*in).DeepCopy() + } + if in.Sleep != nil { + in, out := &in.Sleep, &out.Sleep + *out = (*in).DeepCopy() + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GateNodeSpec. +func (in *GateNodeSpec) DeepCopy() *GateNodeSpec { + if in == nil { + return nil + } + out := new(GateNodeSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *GateNodeStatus) DeepCopyInto(out *GateNodeStatus) { + *out = *in + out.MutableStruct = in.MutableStruct + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GateNodeStatus. +func (in *GateNodeStatus) DeepCopy() *GateNodeStatus { + if in == nil { + return nil + } + out := new(GateNodeStatus) + in.DeepCopyInto(out) + return out +} + // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Identifier. func (in *Identifier) DeepCopy() *Identifier { if in == nil { @@ -391,8 +417,7 @@ func (in *NodeSpec) DeepCopyInto(out *NodeSpec) { } if in.BranchNode != nil { in, out := &in.BranchNode, &out.BranchNode - *out = new(BranchNodeSpec) - (*in).DeepCopyInto(*out) + *out = (*in).DeepCopy() } if in.TaskRef != nil { in, out := &in.TaskRef, &out.TaskRef @@ -404,6 +429,16 @@ func (in *NodeSpec) DeepCopyInto(out *NodeSpec) { *out = new(WorkflowNodeSpec) (*in).DeepCopyInto(*out) } + if in.GateNode != nil { + in, out := &in.GateNode, &out.GateNode + *out = new(GateNodeSpec) + (*in).DeepCopyInto(*out) + } + if in.ArrayNode != nil { + in, out := &in.ArrayNode, &out.ArrayNode + *out = new(ArrayNodeSpec) + (*in).DeepCopyInto(*out) + } if in.InputBindings != nil { in, out := &in.InputBindings, &out.InputBindings *out = make([]*Binding, len(*in)) @@ -446,6 +481,10 @@ func (in *NodeSpec) DeepCopyInto(out *NodeSpec) { *out = new(v1.Affinity) (*in).DeepCopyInto(*out) } + if in.ExtendedResources != nil { + in, out := &in.ExtendedResources, &out.ExtendedResources + *out = (*in).DeepCopy() + } if in.Tolerations != nil { in, out := &in.Tolerations, &out.Tolerations *out = make([]v1.Toleration, len(*in)) @@ -481,83 +520,6 @@ func (in *NodeSpec) DeepCopy() *NodeSpec { return out } -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *NodeStatus) DeepCopyInto(out *NodeStatus) { - *out = *in - out.MutableStruct = in.MutableStruct - if in.QueuedAt != nil { - in, out := &in.QueuedAt, &out.QueuedAt - *out = (*in).DeepCopy() - } - if in.StartedAt != nil { - in, out := &in.StartedAt, &out.StartedAt - *out = (*in).DeepCopy() - } - if in.StoppedAt != nil { - in, out := &in.StoppedAt, &out.StoppedAt - *out = (*in).DeepCopy() - } - if in.LastUpdatedAt != nil { - in, out := &in.LastUpdatedAt, &out.LastUpdatedAt - *out = (*in).DeepCopy() - } - if in.LastAttemptStartedAt != nil { - in, out := &in.LastAttemptStartedAt, &out.LastAttemptStartedAt - *out = (*in).DeepCopy() - } - if in.ParentNode != nil { - in, out := &in.ParentNode, &out.ParentNode - *out = new(string) - **out = **in - } - if in.ParentTask != nil { - in, out := &in.ParentTask, &out.ParentTask - *out = (*in).DeepCopy() - } - if in.BranchStatus != nil { - in, out := &in.BranchStatus, &out.BranchStatus - *out = new(BranchNodeStatus) - (*in).DeepCopyInto(*out) - } - if in.SubNodeStatus != nil { - in, out := &in.SubNodeStatus, &out.SubNodeStatus - *out = make(map[string]*NodeStatus, len(*in)) - for key, val := range *in { - var outVal *NodeStatus - if val == nil { - (*out)[key] = nil - } else { - in, out := &val, &outVal - *out = new(NodeStatus) - (*in).DeepCopyInto(*out) - } - (*out)[key] = outVal - } - } - if in.WorkflowNodeStatus != nil { - in, out := &in.WorkflowNodeStatus, &out.WorkflowNodeStatus - *out = new(WorkflowNodeStatus) - (*in).DeepCopyInto(*out) - } - if in.TaskNodeStatus != nil { - in, out := &in.TaskNodeStatus, &out.TaskNodeStatus - *out = (*in).DeepCopy() - } - if in.DynamicNodeStatus != nil { - in, out := &in.DynamicNodeStatus, &out.DynamicNodeStatus - *out = new(DynamicNodeStatus) - (*in).DeepCopyInto(*out) - } - if in.Error != nil { - in, out := &in.Error, &out.Error - *out = (*in).DeepCopy() - } - if in.DataReferenceConstructor != nil { - out.DataReferenceConstructor = in.DataReferenceConstructor - } - return -} - // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodeStatus. func (in *NodeStatus) DeepCopy() *NodeStatus { if in == nil { @@ -609,6 +571,26 @@ func (in *RetryStrategy) DeepCopy() *RetryStrategy { return out } +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SignalCondition. +func (in *SignalCondition) DeepCopy() *SignalCondition { + if in == nil { + return nil + } + out := new(SignalCondition) + in.DeepCopyInto(out) + return out +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SleepCondition. +func (in *SleepCondition) DeepCopy() *SleepCondition { + if in == nil { + return nil + } + out := new(SleepCondition) + in.DeepCopyInto(out) + return out +} + // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TaskExecutionIdentifier. func (in *TaskExecutionIdentifier) DeepCopy() *TaskExecutionIdentifier { if in == nil { @@ -640,6 +622,45 @@ func (in *TaskPluginOverride) DeepCopy() *TaskPluginOverride { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *TaskResourceSpec) DeepCopyInto(out *TaskResourceSpec) { + *out = *in + out.CPU = in.CPU.DeepCopy() + out.Memory = in.Memory.DeepCopy() + out.EphemeralStorage = in.EphemeralStorage.DeepCopy() + out.Storage = in.Storage.DeepCopy() + out.GPU = in.GPU.DeepCopy() + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TaskResourceSpec. +func (in *TaskResourceSpec) DeepCopy() *TaskResourceSpec { + if in == nil { + return nil + } + out := new(TaskResourceSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *TaskResources) DeepCopyInto(out *TaskResources) { + *out = *in + in.Requests.DeepCopyInto(&out.Requests) + in.Limits.DeepCopyInto(&out.Limits) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TaskResources. +func (in *TaskResources) DeepCopy() *TaskResources { + if in == nil { + return nil + } + out := new(TaskResources) + in.DeepCopyInto(out) + return out +} + // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TaskSpec. func (in *TaskSpec) DeepCopy() *TaskSpec { if in == nil { @@ -701,18 +722,6 @@ func (in *WorkflowNodeSpec) DeepCopy() *WorkflowNodeSpec { return out } -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *WorkflowNodeStatus) DeepCopyInto(out *WorkflowNodeStatus) { - *out = *in - out.MutableStruct = in.MutableStruct - if in.ExecutionError != nil { - in, out := &in.ExecutionError, &out.ExecutionError - *out = new(core.ExecutionError) - *out = *in - } - return -} - // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WorkflowNodeStatus. func (in *WorkflowNodeStatus) DeepCopy() *WorkflowNodeStatus { if in == nil { @@ -743,7 +752,6 @@ func (in *WorkflowSpec) DeepCopyInto(out *WorkflowSpec) { } in.DeprecatedConnections.DeepCopyInto(&out.DeprecatedConnections) in.Connections.DeepCopyInto(&out.Connections) - if in.OnFailure != nil { in, out := &in.OnFailure, &out.OnFailure *out = new(NodeSpec) @@ -776,46 +784,6 @@ func (in *WorkflowSpec) DeepCopy() *WorkflowSpec { return out } -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *WorkflowStatus) DeepCopyInto(out *WorkflowStatus) { - *out = *in - if in.StartedAt != nil { - in, out := &in.StartedAt, &out.StartedAt - *out = (*in).DeepCopy() - } - if in.StoppedAt != nil { - in, out := &in.StoppedAt, &out.StoppedAt - *out = (*in).DeepCopy() - } - if in.LastUpdatedAt != nil { - in, out := &in.LastUpdatedAt, &out.LastUpdatedAt - *out = (*in).DeepCopy() - } - if in.NodeStatus != nil { - in, out := &in.NodeStatus, &out.NodeStatus - *out = make(map[string]*NodeStatus, len(*in)) - for key, val := range *in { - var outVal *NodeStatus - if val == nil { - (*out)[key] = nil - } else { - in, out := &val, &outVal - *out = new(NodeStatus) - (*in).DeepCopyInto(*out) - } - (*out)[key] = outVal - } - } - if in.Error != nil { - in, out := &in.Error, &out.Error - *out = (*in).DeepCopy() - } - if in.DataReferenceConstructor != nil { - out.DataReferenceConstructor = in.DataReferenceConstructor - } - return -} - // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WorkflowStatus. func (in *WorkflowStatus) DeepCopy() *WorkflowStatus { if in == nil { diff --git a/flytepropeller/pkg/client/clientset/versioned/clientset.go b/flytepropeller/pkg/client/clientset/versioned/clientset.go index 93d2cabdb4..b78503d1aa 100644 --- a/flytepropeller/pkg/client/clientset/versioned/clientset.go +++ b/flytepropeller/pkg/client/clientset/versioned/clientset.go @@ -4,6 +4,7 @@ package versioned import ( "fmt" + "net/http" flyteworkflowv1alpha1 "github.com/flyteorg/flyte/flytepropeller/pkg/client/clientset/versioned/typed/flyteworkflow/v1alpha1" discovery "k8s.io/client-go/discovery" @@ -39,22 +40,45 @@ func (c *Clientset) Discovery() discovery.DiscoveryInterface { // NewForConfig creates a new Clientset for the given config. // If config's RateLimiter is not set and QPS and Burst are acceptable, // NewForConfig will generate a rate-limiter in configShallowCopy. +// NewForConfig is equivalent to NewForConfigAndClient(c, httpClient), +// where httpClient was generated with rest.HTTPClientFor(c). func NewForConfig(c *rest.Config) (*Clientset, error) { configShallowCopy := *c + + if configShallowCopy.UserAgent == "" { + configShallowCopy.UserAgent = rest.DefaultKubernetesUserAgent() + } + + // share the transport between all clients + httpClient, err := rest.HTTPClientFor(&configShallowCopy) + if err != nil { + return nil, err + } + + return NewForConfigAndClient(&configShallowCopy, httpClient) +} + +// NewForConfigAndClient creates a new Clientset for the given config and http client. +// Note the http client provided takes precedence over the configured transport values. +// If config's RateLimiter is not set and QPS and Burst are acceptable, +// NewForConfigAndClient will generate a rate-limiter in configShallowCopy. +func NewForConfigAndClient(c *rest.Config, httpClient *http.Client) (*Clientset, error) { + configShallowCopy := *c if configShallowCopy.RateLimiter == nil && configShallowCopy.QPS > 0 { if configShallowCopy.Burst <= 0 { return nil, fmt.Errorf("burst is required to be greater than 0 when RateLimiter is not set and QPS is set to greater than 0") } configShallowCopy.RateLimiter = flowcontrol.NewTokenBucketRateLimiter(configShallowCopy.QPS, configShallowCopy.Burst) } + var cs Clientset var err error - cs.flyteworkflowV1alpha1, err = flyteworkflowv1alpha1.NewForConfig(&configShallowCopy) + cs.flyteworkflowV1alpha1, err = flyteworkflowv1alpha1.NewForConfigAndClient(&configShallowCopy, httpClient) if err != nil { return nil, err } - cs.DiscoveryClient, err = discovery.NewDiscoveryClientForConfig(&configShallowCopy) + cs.DiscoveryClient, err = discovery.NewDiscoveryClientForConfigAndClient(&configShallowCopy, httpClient) if err != nil { return nil, err } @@ -64,11 +88,11 @@ func NewForConfig(c *rest.Config) (*Clientset, error) { // NewForConfigOrDie creates a new Clientset for the given config and // panics if there is an error in the config. func NewForConfigOrDie(c *rest.Config) *Clientset { - var cs Clientset - cs.flyteworkflowV1alpha1 = flyteworkflowv1alpha1.NewForConfigOrDie(c) - - cs.DiscoveryClient = discovery.NewDiscoveryClientForConfigOrDie(c) - return &cs + cs, err := NewForConfig(c) + if err != nil { + panic(err) + } + return cs } // New creates a new Clientset for the given RESTClient. diff --git a/flytepropeller/pkg/client/clientset/versioned/fake/clientset_generated.go b/flytepropeller/pkg/client/clientset/versioned/fake/clientset_generated.go index 7504b10cb2..4285d352ce 100644 --- a/flytepropeller/pkg/client/clientset/versioned/fake/clientset_generated.go +++ b/flytepropeller/pkg/client/clientset/versioned/fake/clientset_generated.go @@ -58,7 +58,10 @@ func (c *Clientset) Tracker() testing.ObjectTracker { return c.tracker } -var _ clientset.Interface = &Clientset{} +var ( + _ clientset.Interface = &Clientset{} + _ testing.FakeClient = &Clientset{} +) // FlyteworkflowV1alpha1 retrieves the FlyteworkflowV1alpha1Client func (c *Clientset) FlyteworkflowV1alpha1() flyteworkflowv1alpha1.FlyteworkflowV1alpha1Interface { diff --git a/flytepropeller/pkg/client/clientset/versioned/typed/flyteworkflow/v1alpha1/fake/fake_flyteworkflow.go b/flytepropeller/pkg/client/clientset/versioned/typed/flyteworkflow/v1alpha1/fake/fake_flyteworkflow.go index f7e8b0be5e..81653b47f0 100644 --- a/flytepropeller/pkg/client/clientset/versioned/typed/flyteworkflow/v1alpha1/fake/fake_flyteworkflow.go +++ b/flytepropeller/pkg/client/clientset/versioned/typed/flyteworkflow/v1alpha1/fake/fake_flyteworkflow.go @@ -101,7 +101,7 @@ func (c *FakeFlyteWorkflows) UpdateStatus(ctx context.Context, flyteWorkflow *v1 // Delete takes name of the flyteWorkflow and deletes it. Returns an error if one occurs. func (c *FakeFlyteWorkflows) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { _, err := c.Fake. - Invokes(testing.NewDeleteAction(flyteworkflowsResource, c.ns, name), &v1alpha1.FlyteWorkflow{}) + Invokes(testing.NewDeleteActionWithOptions(flyteworkflowsResource, c.ns, name, opts), &v1alpha1.FlyteWorkflow{}) return err } diff --git a/flytepropeller/pkg/client/clientset/versioned/typed/flyteworkflow/v1alpha1/flyteworkflow_client.go b/flytepropeller/pkg/client/clientset/versioned/typed/flyteworkflow/v1alpha1/flyteworkflow_client.go index 9f9029fcac..556789a1be 100644 --- a/flytepropeller/pkg/client/clientset/versioned/typed/flyteworkflow/v1alpha1/flyteworkflow_client.go +++ b/flytepropeller/pkg/client/clientset/versioned/typed/flyteworkflow/v1alpha1/flyteworkflow_client.go @@ -3,6 +3,8 @@ package v1alpha1 import ( + "net/http" + v1alpha1 "github.com/flyteorg/flyte/flytepropeller/pkg/apis/flyteworkflow/v1alpha1" "github.com/flyteorg/flyte/flytepropeller/pkg/client/clientset/versioned/scheme" rest "k8s.io/client-go/rest" @@ -23,12 +25,28 @@ func (c *FlyteworkflowV1alpha1Client) FlyteWorkflows(namespace string) FlyteWork } // NewForConfig creates a new FlyteworkflowV1alpha1Client for the given config. +// NewForConfig is equivalent to NewForConfigAndClient(c, httpClient), +// where httpClient was generated with rest.HTTPClientFor(c). func NewForConfig(c *rest.Config) (*FlyteworkflowV1alpha1Client, error) { config := *c if err := setConfigDefaults(&config); err != nil { return nil, err } - client, err := rest.RESTClientFor(&config) + httpClient, err := rest.HTTPClientFor(&config) + if err != nil { + return nil, err + } + return NewForConfigAndClient(&config, httpClient) +} + +// NewForConfigAndClient creates a new FlyteworkflowV1alpha1Client for the given config and http client. +// Note the http client provided takes precedence over the configured transport values. +func NewForConfigAndClient(c *rest.Config, h *http.Client) (*FlyteworkflowV1alpha1Client, error) { + config := *c + if err := setConfigDefaults(&config); err != nil { + return nil, err + } + client, err := rest.RESTClientForConfigAndClient(&config, h) if err != nil { return nil, err } From e341bb609e1c98dff8920b7df499c4f070dccf86 Mon Sep 17 00:00:00 2001 From: Eduardo Apolinario Date: Wed, 29 May 2024 17:04:48 -0700 Subject: [PATCH 04/19] Fix lint errors Signed-off-by: Eduardo Apolinario --- flytepropeller/pkg/apis/flyteworkflow/v1alpha1/branch.go | 1 - .../pkg/apis/flyteworkflow/v1alpha1/node_status.go | 6 ++---- flytepropeller/pkg/apis/flyteworkflow/v1alpha1/workflow.go | 7 ++++--- .../pkg/apis/flyteworkflow/v1alpha1/workflow_status.go | 4 ++-- 4 files changed, 8 insertions(+), 10 deletions(-) diff --git a/flytepropeller/pkg/apis/flyteworkflow/v1alpha1/branch.go b/flytepropeller/pkg/apis/flyteworkflow/v1alpha1/branch.go index 51c00b573a..356812ad33 100644 --- a/flytepropeller/pkg/apis/flyteworkflow/v1alpha1/branch.go +++ b/flytepropeller/pkg/apis/flyteworkflow/v1alpha1/branch.go @@ -81,7 +81,6 @@ func (in *BranchNodeSpec) DeepCopyInto(out *BranchNodeSpec) { if in.ElseFail != nil { out.ElseFail = proto.Clone(in.ElseFail).(*core.Error) } - return } func (in *BranchNodeSpec) GetIf() ExecutableIfBlock { diff --git a/flytepropeller/pkg/apis/flyteworkflow/v1alpha1/node_status.go b/flytepropeller/pkg/apis/flyteworkflow/v1alpha1/node_status.go index 7ee776b0e2..85ef8e3e2d 100644 --- a/flytepropeller/pkg/apis/flyteworkflow/v1alpha1/node_status.go +++ b/flytepropeller/pkg/apis/flyteworkflow/v1alpha1/node_status.go @@ -181,7 +181,6 @@ func (in *WorkflowNodeStatus) DeepCopyInto(out *WorkflowNodeStatus) { if in.ExecutionError != nil { out.ExecutionError = proto.Clone(in.ExecutionError).(*core.ExecutionError) } - return } func (in *WorkflowNodeStatus) SetExecutionError(executionError *core.ExecutionError) { @@ -261,7 +260,6 @@ func (in *ArrayNodeStatus) DeepCopyInto(out *ArrayNodeStatus) { in.SubNodeTaskPhases.DeepCopyInto(&out.SubNodeTaskPhases) in.SubNodeRetryAttempts.DeepCopyInto(&out.SubNodeRetryAttempts) in.SubNodeSystemFailures.DeepCopyInto(&out.SubNodeSystemFailures) - return } func (in *ArrayNodeStatus) GetArrayNodePhase() ArrayNodePhase { @@ -418,7 +416,8 @@ func (in *NodeStatus) DeepCopyInto(out *NodeStatus) { if in.SubNodeStatus != nil { in, out := &in.SubNodeStatus, &out.SubNodeStatus *out = make(map[string]*NodeStatus, len(*in)) - for key, val := range *in { + for key, v := range *in { + val := v var outVal *NodeStatus if val == nil { (*out)[key] = nil @@ -460,7 +459,6 @@ func (in *NodeStatus) DeepCopyInto(out *NodeStatus) { if in.DataReferenceConstructor != nil { out.DataReferenceConstructor = in.DataReferenceConstructor } - return } func (in *NodeStatus) IsDirty() bool { diff --git a/flytepropeller/pkg/apis/flyteworkflow/v1alpha1/workflow.go b/flytepropeller/pkg/apis/flyteworkflow/v1alpha1/workflow.go index e3e19931a1..e42d492999 100644 --- a/flytepropeller/pkg/apis/flyteworkflow/v1alpha1/workflow.go +++ b/flytepropeller/pkg/apis/flyteworkflow/v1alpha1/workflow.go @@ -103,7 +103,8 @@ func (in *FlyteWorkflow) DeepCopyInto(out *FlyteWorkflow) { if in.Tasks != nil { in, out := &in.Tasks, &out.Tasks *out = make(map[string]*TaskSpec, len(*in)) - for key, val := range *in { + for key, v := range *in { + val := v var outVal *TaskSpec if val == nil { (*out)[key] = nil @@ -117,7 +118,8 @@ func (in *FlyteWorkflow) DeepCopyInto(out *FlyteWorkflow) { if in.SubWorkflows != nil { in, out := &in.SubWorkflows, &out.SubWorkflows *out = make(map[string]*WorkflowSpec, len(*in)) - for key, val := range *in { + for key, v := range *in { + val := v var outVal *WorkflowSpec if val == nil { (*out)[key] = nil @@ -146,7 +148,6 @@ func (in *FlyteWorkflow) DeepCopyInto(out *FlyteWorkflow) { if in.DataReferenceConstructor != nil { out.DataReferenceConstructor = in.DataReferenceConstructor } - return } func (in *FlyteWorkflow) GetSecurityContext() core.SecurityContext { diff --git a/flytepropeller/pkg/apis/flyteworkflow/v1alpha1/workflow_status.go b/flytepropeller/pkg/apis/flyteworkflow/v1alpha1/workflow_status.go index 613dca4414..3d9bf390d1 100644 --- a/flytepropeller/pkg/apis/flyteworkflow/v1alpha1/workflow_status.go +++ b/flytepropeller/pkg/apis/flyteworkflow/v1alpha1/workflow_status.go @@ -62,7 +62,8 @@ func (in *WorkflowStatus) DeepCopyInto(out *WorkflowStatus) { if in.NodeStatus != nil { in, out := &in.NodeStatus, &out.NodeStatus *out = make(map[string]*NodeStatus, len(*in)) - for key, val := range *in { + for key, v := range *in { + val := v var outVal *NodeStatus if val == nil { (*out)[key] = nil @@ -85,7 +86,6 @@ func (in *WorkflowStatus) DeepCopyInto(out *WorkflowStatus) { if in.DataReferenceConstructor != nil { out.DataReferenceConstructor = in.DataReferenceConstructor } - return } func IsWorkflowPhaseTerminal(p WorkflowPhase) bool { From 49731c7eeee02b8eb41bc65857057343d0774d12 Mon Sep 17 00:00:00 2001 From: Eduardo Apolinario Date: Wed, 29 May 2024 17:05:13 -0700 Subject: [PATCH 05/19] Revert "Pull in k8s.io/code-generator v0.24.1 and uncomment line" This reverts commit 0690d8ae37dcbc1b99ae59f6bf49566a3e4feb0b. Signed-off-by: Eduardo Apolinario --- flytepropeller/go.mod | 5 --- flytepropeller/go.sum | 80 +----------------------------------- flytepropeller/hack/tools.go | 2 +- 3 files changed, 3 insertions(+), 84 deletions(-) diff --git a/flytepropeller/go.mod b/flytepropeller/go.mod index b857b95526..353b4dbbcc 100644 --- a/flytepropeller/go.mod +++ b/flytepropeller/go.mod @@ -37,7 +37,6 @@ require ( k8s.io/apiextensions-apiserver v0.28.4 k8s.io/apimachinery v0.28.4 k8s.io/client-go v0.28.4 - k8s.io/code-generator v0.28.4 k8s.io/klog v1.0.0 k8s.io/utils v0.0.0-20230406110748-d93618cff8a2 sigs.k8s.io/controller-runtime v0.16.3 @@ -130,13 +129,11 @@ require ( go.opentelemetry.io/otel/metric v1.21.0 // indirect go.opentelemetry.io/otel/sdk v1.21.0 // indirect golang.org/x/crypto v0.21.0 // indirect - golang.org/x/mod v0.16.0 // indirect golang.org/x/net v0.23.0 // indirect golang.org/x/oauth2 v0.16.0 // indirect golang.org/x/sys v0.18.0 // indirect golang.org/x/term v0.18.0 // indirect golang.org/x/text v0.14.0 // indirect - golang.org/x/tools v0.19.0 // indirect gomodules.xyz/jsonpatch/v2 v2.4.0 // indirect google.golang.org/api v0.155.0 // indirect google.golang.org/appengine v1.6.8 // indirect @@ -148,7 +145,6 @@ require ( gopkg.in/yaml.v2 v2.4.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect k8s.io/component-base v0.28.4 // indirect - k8s.io/gengo v0.0.0-20230829151522-9cce18d56c01 // indirect k8s.io/klog/v2 v2.100.1 // indirect k8s.io/kube-openapi v0.0.0-20230717233707-2695361300d9 // indirect sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect @@ -164,7 +160,6 @@ replace ( k8s.io/api => k8s.io/api v0.28.2 k8s.io/apimachinery => k8s.io/apimachinery v0.28.2 k8s.io/client-go => k8s.io/client-go v0.28.2 - k8s.io/code-generator => k8s.io/code-generator v0.24.1 k8s.io/kube-openapi => k8s.io/kube-openapi v0.0.0-20230905202853-d090da108d2f sigs.k8s.io/controller-runtime => sigs.k8s.io/controller-runtime v0.16.2 ) diff --git a/flytepropeller/go.sum b/flytepropeller/go.sum index e1f6c2e10c..bc945124be 100644 --- a/flytepropeller/go.sum +++ b/flytepropeller/go.sum @@ -64,13 +64,9 @@ github.com/DiSiqueira/GoTree v1.0.1-0.20180907134536-53a8e837f295 h1:xJ0dAkuxJXf github.com/DiSiqueira/GoTree v1.0.1-0.20180907134536-53a8e837f295/go.mod h1:e0aH495YLkrsIe9fhedd6aSR6fgU/qhKvtroi6y7G/M= github.com/GoogleCloudPlatform/spark-on-k8s-operator v0.0.0-20200723154620-6f35a1152625 h1:cQyO5JQ2iuHnEcF3v24kdDMsgh04RjyFPDtuvD6PCE0= github.com/GoogleCloudPlatform/spark-on-k8s-operator v0.0.0-20200723154620-6f35a1152625/go.mod h1:6PnrZv6zUDkrNMw0mIoGRmGBR7i9LulhKPmxFq4rUiM= -github.com/NYTimes/gziphandler v0.0.0-20170623195520-56545f4a5d46/go.mod h1:3wb06e3pkSAbeQ52E9H9iFoQsEEwGN64994WTCIhntQ= github.com/OneOfOne/xxhash v1.2.2 h1:KMrpdQIwFcEqXDklaen+P1axHaj9BSKzvpUUfnHldSE= github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= -github.com/PuerkitoBio/purell v1.1.1/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= -github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE= github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= -github.com/asaskevich/govalidator v0.0.0-20190424111038-f61b66f89f4a/go.mod h1:lB+ZfQJz7igIIfQNfa7Ml4HSf2uFQQRzpGGRXenZAgY= github.com/aws/aws-sdk-go v1.44.2 h1:5VBk5r06bgxgRKVaUtm1/4NT/rtrnH2E4cnAYv5zgQc= github.com/aws/aws-sdk-go v1.44.2/go.mod h1:y4AeaBuwd2Lk+GepC1E9v0qOiTws0MIWAX4oIKwKHZo= github.com/aws/aws-sdk-go-v2 v1.0.0/go.mod h1:smfAbmpW+tcRVuNUjo3MOArSZmW72t62rkCzc2i0TWM= @@ -128,9 +124,6 @@ github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/dnaeon/go-vcr v1.2.0 h1:zHCHvJYTMh1N7xnV7zf1m1GPBF9Ad0Jk/whtQ1663qI= github.com/dnaeon/go-vcr v1.2.0/go.mod h1:R4UdLID7HZT3taECzJs4YgbbH6PIGXB6W/sc5OLb6RQ= -github.com/docopt/docopt-go v0.0.0-20180111231733-ee0de3bc6815/go.mod h1:WwZ+bS3ebgob9U8Nd0kOddGdZWjyMGR8Wziv+TBNwSE= -github.com/emicklei/go-restful v2.9.5+incompatible/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs= -github.com/emicklei/go-restful/v3 v3.8.0/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRry+4bhvbpWn3mrbc= github.com/emicklei/go-restful/v3 v3.12.0 h1:y2DdzBAURM29NFF94q6RaY4vjIH1rtwDapwQtU84iWk= github.com/emicklei/go-restful/v3 v3.12.0/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRry+4bhvbpWn3mrbc= github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= @@ -165,7 +158,6 @@ github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2 github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= github.com/go-logr/logr v0.1.0/go.mod h1:ixOQHD9gLJUVQQ2ZOR7zLEifBX6tGkNJF4QyIY7sIas= -github.com/go-logr/logr v0.2.0/go.mod h1:z6/tIYblkpsD+a4lm/fGIIU9mZ+XfAiaFtq7xTgseGU= github.com/go-logr/logr v1.2.0/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= github.com/go-logr/logr v1.3.0 h1:2y3SDp0ZXuc6/cjLSZ+Q3ir+QB9T/iG5yYRXqsagWSY= @@ -174,15 +166,10 @@ github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= github.com/go-logr/zapr v1.2.4 h1:QHVo+6stLbfJmYGkQ7uGHUCu5hnAFAj6mDe6Ea0SeOo= github.com/go-logr/zapr v1.2.4/go.mod h1:FyHWQIzQORZ0QVE1BtVHv3cKtNLuXsbNLtpuhNapBOA= -github.com/go-openapi/jsonpointer v0.19.3/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg= github.com/go-openapi/jsonpointer v0.19.6 h1:eCs3fxoIi3Wh6vtgmLTOjdhSpiqphQ+DaPn38N2ZdrE= github.com/go-openapi/jsonpointer v0.19.6/go.mod h1:osyAmYz/mB/C3I+WsTTSgw1ONzaLJoLCyoi6/zppojs= -github.com/go-openapi/jsonreference v0.19.5/go.mod h1:RdybgQwPxbL4UEjuAruzK1x3nE69AqPYEJeo/TWfEeg= -github.com/go-openapi/jsonreference v0.20.1/go.mod h1:Bl1zwGIM8/wsvqjsOQLJ/SH+En5Ap4rVB5KVcIDZG2k= github.com/go-openapi/jsonreference v0.20.2 h1:3sVjiK66+uXK/6oQ8xgcRKcFgQ5KXa2KvnJRumpMGbE= github.com/go-openapi/jsonreference v0.20.2/go.mod h1:Bl1zwGIM8/wsvqjsOQLJ/SH+En5Ap4rVB5KVcIDZG2k= -github.com/go-openapi/swag v0.19.5/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= -github.com/go-openapi/swag v0.19.14/go.mod h1:QYRuS/SOXUCsnplDa677K7+DxSOj6IPNl/eQntq43wQ= github.com/go-openapi/swag v0.22.3 h1:yMBqmnQ0gyZvEb/+KzuWZOXgllrXT4SADYbvDaXHv/g= github.com/go-openapi/swag v0.22.3/go.mod h1:UzaqsxGiab7freDnrUUra0MwWfN/q7tE4j+VcZ0yl14= github.com/go-redis/redis v6.15.7+incompatible h1:3skhDh95XQMpnqeqNftPkQD9jL9e5e36z/1SUm6dy1U= @@ -231,7 +218,6 @@ github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= -github.com/google/gnostic v0.5.7-v3refs/go.mod h1:73MKFl6jIHelAJNaBGFzt3SPtZULs9dYrGFt8OiIsHQ= github.com/google/gnostic-models v0.6.8 h1:yo/ABAfM5IMRsS1VnXjTBvUb61tFIHozhlYvRgGre9I= github.com/google/gnostic-models v0.6.8/go.mod h1:5n7qKqH0f5wFt+aWF8CW6pZLLNOfYuF5OpfBSENuI8U= github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= @@ -249,7 +235,6 @@ github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/ github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= -github.com/google/gofuzz v1.1.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/gofuzz v1.2.0 h1:xRy4A+RhZaiKjJ1bPfwQ8sedCA+YS2YcCHW6ec7JMi0= github.com/google/gofuzz v1.2.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/martian v2.1.0+incompatible h1:/CP5g8u/VJHijgedC/Legn3BAbAaWPgecwXBIDzw5no= @@ -268,7 +253,6 @@ github.com/google/pprof v0.0.0-20200708004538-1a94d8640e99/go.mod h1:ZgVRPoUq/hf github.com/google/pprof v0.0.0-20201023163331-3e6fc7fc9c4c/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20201203190320-1bf35d6f28c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20201218002935-b9804c9f04c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= -github.com/google/pprof v0.0.0-20210407192527-94a9f03dee38/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1 h1:K6RDEckDVWvDI9JAJYCmNdQXq6neHJOYx3V6jnqNEec= github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= @@ -313,7 +297,6 @@ github.com/jmespath/go-jmespath/internal/testify v1.5.1 h1:shLQSRRSCCPj3f2gpwzGw github.com/jmespath/go-jmespath/internal/testify v1.5.1/go.mod h1:L3OGu8Wl2/fWfCI6z80xFu9LTZmf1ZRjMHUOPmWr69U= github.com/josharian/intern v1.0.0 h1:vlS4z54oSdjm0bgjRigI+G1HpF+tI+9rE5LLzOg8HmY= github.com/josharian/intern v1.0.0/go.mod h1:5DoeVV0s6jJacbCEi61lwdGj/aVlrQvzHFFd8Hwg//Y= -github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= @@ -324,7 +307,6 @@ github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxv github.com/kr/fs v0.1.0/go.mod h1:FFnZGqtBN9Gxj7eW1uZ42v5BccTP0vu6NEaFoC2HwRg= github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= -github.com/kr/pretty v0.2.0/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= @@ -340,9 +322,6 @@ github.com/kylelemons/godebug v1.1.0 h1:RPNrshWIDI6G2gRW9EHilWtl7Z6Sb1BR0xunSBf0 github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw= github.com/magiconair/properties v1.8.6 h1:5ibWZ6iY0NctNGWo87LalDlEZ6R41TqbbDamhfG/Qzo= github.com/magiconair/properties v1.8.6/go.mod h1:y3VJvCyxH9uVvJTWEGAELF3aiYNyPKd5NZ3oSwXrF60= -github.com/mailru/easyjson v0.0.0-20190614124828-94de47d64c63/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= -github.com/mailru/easyjson v0.0.0-20190626092158-b2ccc519800e/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= -github.com/mailru/easyjson v0.7.6/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc= github.com/mailru/easyjson v0.7.7 h1:UGYAvKxe3sBsEDzO8ZeWOSlIQfWFlxbzLZe7hwFURr0= github.com/mailru/easyjson v0.7.7/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc= github.com/mattn/go-colorable v0.1.9/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= @@ -359,32 +338,23 @@ github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RR github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= -github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M= github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= -github.com/munnerz/goautoneg v0.0.0-20120707110453-a547fc61f48d/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 h1:C3w9PqII01/Oq1c1nUAm88MOHcQC9l5mIlSMApZMrHA= github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= github.com/ncw/swift v1.0.53 h1:luHjjTNtekIEvHg5KdAFIBaH7bWfNkefwFnpDffSIks= github.com/ncw/swift v1.0.53/go.mod h1:23YIA4yWVnGwv2dQlN4bB7egfYX6YLn0Yo/S6zZO/ZM= -github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A= github.com/nxadm/tail v1.4.8 h1:nPr65rt6Y5JFSKQO7qToXr7pePgD6Gwiw05lkbyAQTE= github.com/nxadm/tail v1.4.8/go.mod h1:+ncqLTQzXmGhMZNUePPaPqPvBxHAIsmXswZKocGu+AU= github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk= -github.com/onsi/ginkgo v1.14.0/go.mod h1:iSB4RoI2tjJc9BBv4NKIKWKya62Rps+oPG/Lv9klQyY= -github.com/onsi/ginkgo v1.16.4/go.mod h1:dX+/inL/fNMqNlz0e9LfyB9TswhZpCVdJM/Z6Vvnwo0= github.com/onsi/ginkgo v1.16.5 h1:8xi0RTUf59SOSfEtZMvwTvXYMzG4gV23XVHOZiXNtnE= github.com/onsi/ginkgo v1.16.5/go.mod h1:+E8gABHa3K6zRBolWtd+ROzc/U5bkGt0FwiG042wbpU= -github.com/onsi/ginkgo/v2 v2.1.3/go.mod h1:vw5CSIxN1JObi/U8gcbwft7ZxR2dgaR70JSE3/PpL4c= -github.com/onsi/ginkgo/v2 v2.1.4/go.mod h1:um6tUpWM/cxCK3/FK8BXqEiUMUwRgSM4JXG47RKZmLU= github.com/onsi/ginkgo/v2 v2.11.0 h1:WgqUCUt/lT6yXoQ8Wef0fsNn5cAuMK7+KT9UFRz2tcU= github.com/onsi/ginkgo/v2 v2.11.0/go.mod h1:ZhrRA5XmEE3x3rhlzamx/JJvujdZoJ2uvgI7kR0iZvM= github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY= github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo= -github.com/onsi/gomega v1.17.0/go.mod h1:HnhC7FXeEQY45zxNK3PPoIUhzk/80Xly9PcubAlGdZY= -github.com/onsi/gomega v1.19.0/go.mod h1:LY+I3pBVzYsTBU1AnDwOSxaYi9WoWiqgwooUqq9yPro= github.com/onsi/gomega v1.27.10 h1:naR28SdDFlqrG6kScpT8VWpu1xWY5nJRCF3XaYyBjhI= github.com/onsi/gomega v1.27.10/go.mod h1:RsS8tutOdbdgzbPtzzATp12yT7kM5I5aElG3evPbQ0M= github.com/opentracing/opentracing-go v1.1.0/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= @@ -421,7 +391,6 @@ github.com/sirupsen/logrus v1.9.3 h1:dueUQJ1C2q9oE3F7wvmSGAaVtTmUizReu6fjN8uqzbQ github.com/sirupsen/logrus v1.9.3/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72 h1:qLC7fQah7D6K1B0ujays3HV9gkFtllcxhzImRR7ArPQ= github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= -github.com/spf13/afero v1.2.2/go.mod h1:9ZxEEn6pIJ8Rxe320qSDBk6AsU0r9pR7Q4OcevTdifk= github.com/spf13/afero v1.9.2 h1:j49Hj62F0n+DaZ1dDCvhABaPNSGNkt32oRFxI33IEMw= github.com/spf13/afero v1.9.2/go.mod h1:iUV7ddyEEZPO5gA3zD4fJt6iStLlL+Lg4m2cihcDf8Y= github.com/spf13/cast v1.4.1 h1:s0hze+J0196ZfEMTs80N7UlFt0BDuQ7Q+JDnHiMWKdA= @@ -434,7 +403,6 @@ github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= github.com/spf13/viper v1.11.0 h1:7OX/1FS6n7jHD1zGrZTM7WtY13ZELRyosK4k93oPr44= github.com/spf13/viper v1.11.0/go.mod h1:djo0X/bA5+tYVoCn+C7cAYJGcVn/qYLFTG8gdUsX7Zk= -github.com/stoewer/go-strcase v1.2.0/go.mod h1:IBiWB2sKIp3wVVQ3Y035++gc+knqhUQag1KpM8ahLw8= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= @@ -445,7 +413,6 @@ github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXf github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= -github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= @@ -458,7 +425,6 @@ github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9de github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -github.com/yuin/goldmark v1.4.1/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= @@ -539,11 +505,7 @@ golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.1/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.6.0-dev.0.20220106191415-9b9b3d81d5e3/go.mod h1:3p9vT2HGsQu2K1YbXdKPJLVgG5VJdoTa1poYQBtP1AY= golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= -golang.org/x/mod v0.7.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= -golang.org/x/mod v0.16.0 h1:QX4fJ0Rr5cPQCF7O9lh9Se4pmwfwskqZfq5moyldzic= -golang.org/x/mod v0.16.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -557,7 +519,6 @@ golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190628185345-da137c7871d7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190724013045-ca1201d0de80/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20190827160401-ba9fcec4b297/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20191209160850-c0dbc17a3553/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200114155413-6afb5195e5aa/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200202094626-16171245cfb2/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= @@ -580,13 +541,8 @@ golang.org/x/net v0.0.0-20201209123823-ac852fbbde11/go.mod h1:m0MpNAwzfU5UDzcl9v golang.org/x/net v0.0.0-20201224014010-6772e930b67b/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= -golang.org/x/net v0.0.0-20210428140749-89ef3d95e781/go.mod h1:OJAsFXCWl8Ukc7SiCT/9KSuxbyM7479/AVlXFRxuMCk= -golang.org/x/net v0.0.0-20211015210444-4f30a5c0130f/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= -golang.org/x/net v0.0.0-20220225172249-27dd8689420f/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= -golang.org/x/net v0.3.0/go.mod h1:MBQ8lrhLObU/6UmLb4fmbmk5OcyYmqtbGd/9yIeKjEE= -golang.org/x/net v0.7.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= golang.org/x/net v0.23.0 h1:7EYJ93RZ9vYSZAIb2x3lnuvqO5zneoD6IvWjuhfxjTs= golang.org/x/net v0.23.0/go.mod h1:JKghWKKOSdJwpW2GEx0Ja7fmaKnMsbu+MWVZTokSYmg= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= @@ -611,9 +567,7 @@ golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.6.0 h1:5BMeUDZ7vkXGfEr1x9B4bRcTH4lpkTkpdh0T/J+qjbQ= golang.org/x/sync v0.6.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -645,7 +599,6 @@ golang.org/x/sys v0.0.0-20200331124033-c3d80250170d/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20200501052902-10377860bb8e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200511232937-7e40ca221e25/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200515095857-1151b9dac4a9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200519105757-fe76b779f299/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200523222454-059865788121/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200803210538-64077c9b5642/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200905004654-be1d3432aa8f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -657,30 +610,22 @@ golang.org/x/sys v0.0.0-20210112080510-489259a85091/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210225134936-a50acf3fe073/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210423185535-09eb48e85fd7/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210616045830-e2b7044e8c71/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20211019181941-9d821ace8654/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220209214540-3681064d5158/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220319134239-a9b59b0215f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220908164124-27713097b956/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.3.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.18.0 h1:DBdB3niSjOA/O0blCZBqDefyWNYveAYMNF1Wum0DYQ4= golang.org/x/sys v0.18.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= -golang.org/x/term v0.3.0/go.mod h1:q750SLmJuPmVoN1blW3UFBPREJfb1KmY3vwxfr+nFDA= -golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k= golang.org/x/term v0.18.0 h1:FcHjZXDMxI8mM3nwhX9HlKop4C0YQvCVCdwYl2wOtE8= golang.org/x/term v0.18.0/go.mod h1:ILwASektA3OnRv7amZ1xhE/KTR+u50pbXfZ03+6Nx58= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -690,11 +635,8 @@ golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= golang.org/x/text v0.3.8/go.mod h1:E6s5w1FMmriuDzIBO73fBruAKo1PCIq6d2Q6DHfQ8WQ= -golang.org/x/text v0.5.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= -golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ= golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= @@ -736,7 +678,6 @@ golang.org/x/tools v0.0.0-20200304193943-95d2e580d8eb/go.mod h1:o4KQGtdN14AW+yjs golang.org/x/tools v0.0.0-20200312045724-11d5b4c81c7d/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= golang.org/x/tools v0.0.0-20200331025713-a30bf2db82d4/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8= golang.org/x/tools v0.0.0-20200501065659-ab2804fb9c9d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200505023115-26f46d2f7ef8/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200512131952-2bc93b1c0c88/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200515010526-7d3b6ebf133d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200618134242-20370b0cb4b2/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= @@ -753,10 +694,7 @@ golang.org/x/tools v0.0.0-20210105154028-b0ab187a4818/go.mod h1:emZCQorbCU4vsT4f golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20210108195828-e2f9c7f1fc8e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0= -golang.org/x/tools v0.1.10-0.20220218145154-897bd77cd717/go.mod h1:Uh6Zz+xoGYZom868N8YTex3t7RhtHDBrE8Gzo9bV56E= -golang.org/x/tools v0.1.10/go.mod h1:Uh6Zz+xoGYZom868N8YTex3t7RhtHDBrE8Gzo9bV56E= golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= -golang.org/x/tools v0.4.0/go.mod h1:UE5sM2OK9E/d67R0ANs2xJizIymRP5gJU295PvKXxjQ= golang.org/x/tools v0.19.0 h1:tfGCXNR1OsFG+sVdLAitlpjAvD/I6dHDKnYrpEZUHkw= golang.org/x/tools v0.19.0/go.mod h1:qoJWxmGSIBmAeriMx19ogtrEPrGtDbPK634QFIcLAhc= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= @@ -829,7 +767,6 @@ google.golang.org/genproto v0.0.0-20200729003335-053ba62fc06f/go.mod h1:FWY/as6D google.golang.org/genproto v0.0.0-20200804131852-c06518451d9c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20200825200019-8632dd797987/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20200904004341-0bd0a958aa1d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20201019141844-1ed22bb0c154/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20201109203340-2640f1f9cdfb/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20201201144952-b05cb90ed32e/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20201210142538-e3217bee35cc/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= @@ -882,8 +819,6 @@ google.golang.org/protobuf v1.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGm google.golang.org/protobuf v1.33.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= @@ -902,8 +837,6 @@ gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -gopkg.in/yaml.v3 v3.0.0-20200615113413-eeeca48fe776/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.0/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= @@ -924,23 +857,16 @@ k8s.io/apimachinery v0.28.2 h1:KCOJLrc6gu+wV1BYgwik4AF4vXOlVJPdiqn0yAWWwXQ= k8s.io/apimachinery v0.28.2/go.mod h1:RdzF87y/ngqk9H4z3EL2Rppv5jj95vGS/HaFXrLDApU= k8s.io/client-go v0.28.2 h1:DNoYI1vGq0slMBN/SWKMZMw0Rq+0EQW6/AK4v9+3VeY= k8s.io/client-go v0.28.2/go.mod h1:sMkApowspLuc7omj1FOSUxSoqjr+d5Q0Yc0LOFnYFJY= -k8s.io/code-generator v0.24.1 h1:zS+dvmUNaOcvsQ4faV9hXNjsKG9/pQaLnts1Wma4RM8= -k8s.io/code-generator v0.24.1/go.mod h1:dpVhs00hTuTdTY6jvVxvTFCk6gSMrtfRydbhZwHI15w= +k8s.io/code-generator v0.28.4 h1:tcOSNIZQvuAvXhOwpbuJkKbAABJQeyCcQBCN/3uI18c= +k8s.io/code-generator v0.28.4/go.mod h1:OQAfl6bZikQ/tK6faJ18Vyzo54rUII2NmjurHyiN1g4= k8s.io/component-base v0.28.4 h1:c/iQLWPdUgI90O+T9TeECg8o7N3YJTiuz2sKxILYcYo= k8s.io/component-base v0.28.4/go.mod h1:m9hR0uvqXDybiGL2nf/3Lf0MerAfQXzkfWhUY58JUbU= -k8s.io/gengo v0.0.0-20211129171323-c02415ce4185/go.mod h1:FiNAH4ZV3gBg2Kwh89tzAEV2be7d5xI0vBa/VySYy3E= -k8s.io/gengo v0.0.0-20230829151522-9cce18d56c01 h1:pWEwq4Asjm4vjW7vcsmijwBhOr1/shsbSYiWXmNGlks= -k8s.io/gengo v0.0.0-20230829151522-9cce18d56c01/go.mod h1:FiNAH4ZV3gBg2Kwh89tzAEV2be7d5xI0vBa/VySYy3E= k8s.io/klog v1.0.0 h1:Pt+yjF5aB1xDSVbau4VsWe+dQNzA0qv1LlXdC2dF6Q8= k8s.io/klog v1.0.0/go.mod h1:4Bi6QPql/J/LkTDqv7R/cd3hPo4k2DG6Ptcz060Ez5I= -k8s.io/klog/v2 v2.0.0/go.mod h1:PBfzABfn139FHAV07az/IF9Wp1bkk3vpT2XSJ76fSDE= -k8s.io/klog/v2 v2.2.0/go.mod h1:Od+F08eJP+W3HUb4pSrPpgp9DGU4GzlpG/TmITuYh/Y= -k8s.io/klog/v2 v2.60.1/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0= k8s.io/klog/v2 v2.100.1 h1:7WCHKK6K8fNhTqfBhISHQ97KrnJNFZMcQvKp7gP/tmg= k8s.io/klog/v2 v2.100.1/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0= k8s.io/kube-openapi v0.0.0-20230905202853-d090da108d2f h1:eeEUOoGYWhOz7EyXqhlR2zHKNw2mNJ9vzJmub6YN6kk= k8s.io/kube-openapi v0.0.0-20230905202853-d090da108d2f/go.mod h1:AsvuZPBlUDVuCdzJ87iajxtXuR9oktsTctW/R9wwouA= -k8s.io/utils v0.0.0-20210802155522-efc7438f0176/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= k8s.io/utils v0.0.0-20230406110748-d93618cff8a2 h1:qY1Ad8PODbnymg2pRbkyMT/ylpTrCM8P2RJ0yroCyIk= k8s.io/utils v0.0.0-20230406110748-d93618cff8a2/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= @@ -950,9 +876,7 @@ sigs.k8s.io/controller-runtime v0.16.2 h1:mwXAVuEk3EQf478PQwQ48zGOXvW27UJc8NHktQ sigs.k8s.io/controller-runtime v0.16.2/go.mod h1:vpMu3LpI5sYWtujJOa2uPK61nB5rbwlN7BAB8aSLvGU= sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd h1:EDPBXCAspyGV4jQlpZSudPeMmr1bNJefnuqLsRAsHZo= sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd/go.mod h1:B8JuhiUyNFVKdsE8h686QcCxMaH6HrOAZj4vswFpcB0= -sigs.k8s.io/structured-merge-diff/v4 v4.2.1/go.mod h1:j/nl6xW8vLS49O8YvXW1ocPhZawJtm+Yrr7PPRQ0Vg4= sigs.k8s.io/structured-merge-diff/v4 v4.2.3 h1:PRbqxJClWWYMNV1dhaG4NsibJbArud9kFxnAMREiWFE= sigs.k8s.io/structured-merge-diff/v4 v4.2.3/go.mod h1:qjx8mGObPmV2aSZepjQjbmb2ihdVs8cGKBraizNC69E= -sigs.k8s.io/yaml v1.2.0/go.mod h1:yfXDCHCao9+ENCvLSE62v9VSji2MKu5jeNfTrofGhJc= sigs.k8s.io/yaml v1.3.0 h1:a2VclLzOGrwOHDiV8EfBGhvjHvP46CtW5j6POvhYGGo= sigs.k8s.io/yaml v1.3.0/go.mod h1:GeOyir5tyXNByN85N/dRIT9es5UQNerPYEKK56eTBm8= diff --git a/flytepropeller/hack/tools.go b/flytepropeller/hack/tools.go index 0032e546da..5b96173b64 100644 --- a/flytepropeller/hack/tools.go +++ b/flytepropeller/hack/tools.go @@ -2,4 +2,4 @@ package tools // Uncomment this to make code-generator work -import _ "k8s.io/code-generator" +// import _ "k8s.io/code-generator" From c80ad37fcbc4ad58da1d58e9db2944a91b2a57d5 Mon Sep 17 00:00:00 2001 From: Eduardo Apolinario Date: Thu, 6 Jun 2024 16:09:28 -0700 Subject: [PATCH 06/19] Fix Branch Signed-off-by: Eduardo Apolinario --- .../pkg/apis/flyteworkflow/v1alpha1/branch.go | 62 ++++++++-------- .../flyteworkflow/v1alpha1/branch_test.go | 72 ++++++++++++++++++- .../v1alpha1/zz_generated.deepcopy.go | 40 ++++++++++- 3 files changed, 138 insertions(+), 36 deletions(-) diff --git a/flytepropeller/pkg/apis/flyteworkflow/v1alpha1/branch.go b/flytepropeller/pkg/apis/flyteworkflow/v1alpha1/branch.go index 356812ad33..86ce6bc7ba 100644 --- a/flytepropeller/pkg/apis/flyteworkflow/v1alpha1/branch.go +++ b/flytepropeller/pkg/apis/flyteworkflow/v1alpha1/branch.go @@ -32,9 +32,7 @@ func (in *BooleanExpression) UnmarshalJSON(b []byte) error { // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *BooleanExpression) DeepCopyInto(out *BooleanExpression) { - *out = *in - // We do not manipulate the object, so its ok - // Once we figure out the autogenerate story we can replace this + out.BooleanExpression = proto.Clone(in.BooleanExpression).(*core.BooleanExpression) } type IfBlock struct { @@ -50,37 +48,35 @@ func (in *IfBlock) GetThenNode() *NodeID { return in.ThenNode } -type BranchNodeSpec struct { - If IfBlock `json:"if"` - ElseIf []*IfBlock `json:"elseIf,omitempty"` - Else *NodeID `json:"else,omitempty"` - ElseFail *core.Error `json:"elseFail,omitempty"` -} - -// BranchNodeSpec contains at least one proto message directly, which means that we need to -// implement DeepCopyInto since the generated proto messages do not implement that function. -func (in *BranchNodeSpec) DeepCopyInto(out *BranchNodeSpec) { - *out = *in - in.If.DeepCopyInto(&out.If) - if in.ElseIf != nil { - in, out := &in.ElseIf, &out.ElseIf - *out = make([]*IfBlock, len(*in)) - for i := range *in { - if (*in)[i] != nil { - in, out := &(*in)[i], &(*out)[i] - *out = new(IfBlock) - (*in).DeepCopyInto(*out) - } - } - } - if in.Else != nil { - in, out := &in.Else, &out.Else - *out = new(string) - **out = **in +type Error struct { + *core.Error +} + +func (in *Error) UnmarshalJSON(b []byte) error { + in.Error = &core.Error{} + return jsonpb.Unmarshal(bytes.NewReader(b), in.Error) +} + +func (in Error) MarshalJSON() ([]byte, error) { + if in.Error == nil { + return nilJSON, nil } - if in.ElseFail != nil { - out.ElseFail = proto.Clone(in.ElseFail).(*core.Error) + var buf bytes.Buffer + if err := marshaler.Marshal(&buf, in.Error); err != nil { + return nil, err } + return buf.Bytes(), nil +} + +func (in *Error) DeepCopyInto(out *Error) { + out.Error = proto.Clone(in.Error).(*core.Error) +} + +type BranchNodeSpec struct { + If IfBlock `json:"if"` + ElseIf []*IfBlock `json:"elseIf,omitempty"` + Else *NodeID `json:"else,omitempty"` + ElseFail *Error `json:"elseFail,omitempty"` } func (in *BranchNodeSpec) GetIf() ExecutableIfBlock { @@ -100,5 +96,5 @@ func (in *BranchNodeSpec) GetElseIf() []ExecutableIfBlock { } func (in *BranchNodeSpec) GetElseFail() *core.Error { - return in.ElseFail + return in.ElseFail.Error } diff --git a/flytepropeller/pkg/apis/flyteworkflow/v1alpha1/branch_test.go b/flytepropeller/pkg/apis/flyteworkflow/v1alpha1/branch_test.go index 5fd2a14218..af8221266c 100644 --- a/flytepropeller/pkg/apis/flyteworkflow/v1alpha1/branch_test.go +++ b/flytepropeller/pkg/apis/flyteworkflow/v1alpha1/branch_test.go @@ -6,6 +6,7 @@ import ( "testing" "github.com/stretchr/testify/assert" + "google.golang.org/protobuf/proto" "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/core" ) @@ -30,8 +31,10 @@ func TestBranchNodeSpecMethods(t *testing.T) { boolExpr := &core.BooleanExpression{} // Creating an Error instance for testing - errorMessage := &core.Error{ - Message: "Test error", + errorMessage := &Error{ + Error: &core.Error{ + Message: "Test error", + }, } ifNode := NodeID("ifNode") @@ -76,3 +79,68 @@ func TestBranchNodeSpecMethods(t *testing.T) { branchNodeSpec.ElseFail = nil assert.Nil(t, branchNodeSpec.GetElseFail()) } + +func TestWrappedBooleanExpressionDeepCopy(t *testing.T) { + // 1. Set up proto + protoBoolExpr := &core.BooleanExpression{ + Expr: &core.BooleanExpression_Comparison{ + Comparison: &core.ComparisonExpression{ + Operator: core.ComparisonExpression_GT, + LeftValue: &core.Operand{ + Val: &core.Operand_Primitive{ + Primitive: &core.Primitive{ + Value: &core.Primitive_Integer{ + Integer: 10, + }, + }, + }, + }, + RightValue: &core.Operand{ + Val: &core.Operand_Primitive{ + Primitive: &core.Primitive{ + Value: &core.Primitive_Integer{ + Integer: 11, + }, + }, + }, + }, + }, + }, + } + + // 2. Define the wrapper object + boolExpr := BooleanExpression{ + BooleanExpression: protoBoolExpr, + } + + // 3. Deep copy the wrapper object + copyBoolExpr := boolExpr.DeepCopy() + + // 4. Compare the pointers and the actual values + // Assert that the pointers are different + assert.True(t, boolExpr.BooleanExpression != copyBoolExpr.BooleanExpression) + + // Assert that the values stored in the proto messages are equal + assert.True(t, proto.Equal(boolExpr.BooleanExpression, copyBoolExpr.BooleanExpression)) +} + +func TestWrappedErrorDeepCopy(t *testing.T) { + // 1. Set up proto + protoError := &core.Error{ + Message: "an error", + } + + // 2. Define the wrapper object + error := Error{ + Error: protoError, + } + + // 3. Deep copy the wrapper object + copyError := error.DeepCopy() + + // 4. Compare the pointers and the actual values + // Assert that the pointers are different + assert.True(t, error.Error != copyError.Error) + // Assert that the values stored in the proto messages are equal + assert.True(t, proto.Equal(error.Error, copyError.Error)) +} diff --git a/flytepropeller/pkg/apis/flyteworkflow/v1alpha1/zz_generated.deepcopy.go b/flytepropeller/pkg/apis/flyteworkflow/v1alpha1/zz_generated.deepcopy.go index 6e1fee9c69..dbfbd4c734 100644 --- a/flytepropeller/pkg/apis/flyteworkflow/v1alpha1/zz_generated.deepcopy.go +++ b/flytepropeller/pkg/apis/flyteworkflow/v1alpha1/zz_generated.deepcopy.go @@ -97,6 +97,33 @@ func (in *BooleanExpression) DeepCopy() *BooleanExpression { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *BranchNodeSpec) DeepCopyInto(out *BranchNodeSpec) { + *out = *in + in.If.DeepCopyInto(&out.If) + if in.ElseIf != nil { + in, out := &in.ElseIf, &out.ElseIf + *out = make([]*IfBlock, len(*in)) + for i := range *in { + if (*in)[i] != nil { + in, out := &(*in)[i], &(*out)[i] + *out = new(IfBlock) + (*in).DeepCopyInto(*out) + } + } + } + if in.Else != nil { + in, out := &in.Else, &out.Else + *out = new(string) + **out = **in + } + if in.ElseFail != nil { + in, out := &in.ElseFail, &out.ElseFail + *out = (*in).DeepCopy() + } + return +} + // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BranchNodeSpec. func (in *BranchNodeSpec) DeepCopy() *BranchNodeSpec { if in == nil { @@ -170,6 +197,16 @@ func (in *DynamicNodeStatus) DeepCopy() *DynamicNodeStatus { return out } +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Error. +func (in *Error) DeepCopy() *Error { + if in == nil { + return nil + } + out := new(Error) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *ExecutionConfig) DeepCopyInto(out *ExecutionConfig) { *out = *in @@ -417,7 +454,8 @@ func (in *NodeSpec) DeepCopyInto(out *NodeSpec) { } if in.BranchNode != nil { in, out := &in.BranchNode, &out.BranchNode - *out = (*in).DeepCopy() + *out = new(BranchNodeSpec) + (*in).DeepCopyInto(*out) } if in.TaskRef != nil { in, out := &in.TaskRef, &out.TaskRef From 2583a89970ac766fcc431f3e33376612b194096e Mon Sep 17 00:00:00 2001 From: Eduardo Apolinario Date: Thu, 6 Jun 2024 21:32:30 -0700 Subject: [PATCH 07/19] Fix ExecutionError Signed-off-by: Eduardo Apolinario --- .../pkg/apis/flyteworkflow/v1alpha1/error.go | 3 ++- .../apis/flyteworkflow/v1alpha1/error_test.go | 18 ++++++++++++++++++ 2 files changed, 20 insertions(+), 1 deletion(-) diff --git a/flytepropeller/pkg/apis/flyteworkflow/v1alpha1/error.go b/flytepropeller/pkg/apis/flyteworkflow/v1alpha1/error.go index 39ec19c165..0aee9510cd 100644 --- a/flytepropeller/pkg/apis/flyteworkflow/v1alpha1/error.go +++ b/flytepropeller/pkg/apis/flyteworkflow/v1alpha1/error.go @@ -4,6 +4,7 @@ import ( "bytes" "github.com/golang/protobuf/jsonpb" + "google.golang.org/protobuf/proto" "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/core" ) @@ -30,5 +31,5 @@ func (in *ExecutionError) MarshalJSON() ([]byte, error) { } func (in *ExecutionError) DeepCopyInto(out *ExecutionError) { - *out = *in + out.ExecutionError = proto.Clone(in.ExecutionError).(*core.ExecutionError) } diff --git a/flytepropeller/pkg/apis/flyteworkflow/v1alpha1/error_test.go b/flytepropeller/pkg/apis/flyteworkflow/v1alpha1/error_test.go index 4e0968205d..fc0d35f9cf 100644 --- a/flytepropeller/pkg/apis/flyteworkflow/v1alpha1/error_test.go +++ b/flytepropeller/pkg/apis/flyteworkflow/v1alpha1/error_test.go @@ -4,6 +4,7 @@ import ( "encoding/json" "testing" + "github.com/golang/protobuf/proto" "github.com/stretchr/testify/assert" "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/core" @@ -28,3 +29,20 @@ func TestExecutionErrorJSONMarshalling(t *testing.T) { assert.Equal(t, execError.Message, newExecErr.ExecutionError.Message) assert.Equal(t, execError.ErrorUri, newExecErr.ExecutionError.ErrorUri) } + +func TestExecutionErrorDeepCopy(t *testing.T) { + execError := &core.ExecutionError{ + Code: "TestCode", + Message: "Test error message", + ErrorUri: "Test error uri", + } + + execErr := &ExecutionError{ExecutionError: execError} + newExecErr := execErr.DeepCopy() + + // 4. Compare the pointers and the actual values + // Assert that the pointers are different + assert.True(t, execErr.ExecutionError != newExecErr.ExecutionError) + // Assert that the values stored in the proto messages are equal + assert.True(t, proto.Equal(execErr.ExecutionError, newExecErr.ExecutionError)) +} From 4a22d29f11f2373207930ec6eddc8dd0ba0c4f1b Mon Sep 17 00:00:00 2001 From: Eduardo Apolinario Date: Thu, 6 Jun 2024 22:22:18 -0700 Subject: [PATCH 08/19] Fix RawOutputDataConfig, ExecutionConfig, WorkflowExecutionIdentifier, and Inputs Signed-off-by: Eduardo Apolinario --- .../flyteworkflow/v1alpha1/branch_test.go | 12 ++-- .../v1alpha1/execution_config.go | 3 +- .../v1alpha1/execution_config_test.go | 55 +++++++++++++++++ .../apis/flyteworkflow/v1alpha1/identifier.go | 3 +- .../apis/flyteworkflow/v1alpha1/workflow.go | 6 +- .../flyteworkflow/v1alpha1/workflow_test.go | 59 +++++++++++++++++++ 6 files changed, 126 insertions(+), 12 deletions(-) diff --git a/flytepropeller/pkg/apis/flyteworkflow/v1alpha1/branch_test.go b/flytepropeller/pkg/apis/flyteworkflow/v1alpha1/branch_test.go index af8221266c..c1fffdb061 100644 --- a/flytepropeller/pkg/apis/flyteworkflow/v1alpha1/branch_test.go +++ b/flytepropeller/pkg/apis/flyteworkflow/v1alpha1/branch_test.go @@ -136,11 +136,11 @@ func TestWrappedErrorDeepCopy(t *testing.T) { } // 3. Deep copy the wrapper object - copyError := error.DeepCopy() + errorCopy := error.DeepCopy() - // 4. Compare the pointers and the actual values - // Assert that the pointers are different - assert.True(t, error.Error != copyError.Error) - // Assert that the values stored in the proto messages are equal - assert.True(t, proto.Equal(error.Error, copyError.Error)) + // 4. Assert that the pointers are different + assert.True(t, error.Error != errorCopy.Error) + + // 5. Assert that the values stored in the proto messages are equal + assert.True(t, proto.Equal(error.Error, errorCopy.Error)) } diff --git a/flytepropeller/pkg/apis/flyteworkflow/v1alpha1/execution_config.go b/flytepropeller/pkg/apis/flyteworkflow/v1alpha1/execution_config.go index 30cd9fa0de..e8023d68d8 100644 --- a/flytepropeller/pkg/apis/flyteworkflow/v1alpha1/execution_config.go +++ b/flytepropeller/pkg/apis/flyteworkflow/v1alpha1/execution_config.go @@ -1,6 +1,7 @@ package v1alpha1 import ( + "google.golang.org/protobuf/proto" "k8s.io/apimachinery/pkg/api/resource" "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin" @@ -15,7 +16,7 @@ type RawOutputDataConfig struct { } func (in *RawOutputDataConfig) DeepCopyInto(out *RawOutputDataConfig) { - *out = *in + out.RawOutputDataConfig = proto.Clone(in.RawOutputDataConfig).(*admin.RawOutputDataConfig) } // This contains workflow-execution specifications and overrides. diff --git a/flytepropeller/pkg/apis/flyteworkflow/v1alpha1/execution_config_test.go b/flytepropeller/pkg/apis/flyteworkflow/v1alpha1/execution_config_test.go index b3751b4268..e69b354bf0 100644 --- a/flytepropeller/pkg/apis/flyteworkflow/v1alpha1/execution_config_test.go +++ b/flytepropeller/pkg/apis/flyteworkflow/v1alpha1/execution_config_test.go @@ -4,8 +4,11 @@ import ( "testing" "github.com/stretchr/testify/assert" + "google.golang.org/protobuf/proto" + "k8s.io/apimachinery/pkg/api/resource" "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin" + "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/core" ) func TestRawOutputConfig(t *testing.T) { @@ -14,3 +17,55 @@ func TestRawOutputConfig(t *testing.T) { }} assert.Equal(t, "s3://bucket", r.OutputLocationPrefix) } + +func TestWrappedRawOutputConfigDeepCopy(t *testing.T) { + rawOutputDataConfig := RawOutputDataConfig{&admin.RawOutputDataConfig{ + OutputLocationPrefix: "s3://bucket", + }} + rawOutputDataConfigCopy := rawOutputDataConfig.DeepCopy() + + assert.True(t, rawOutputDataConfig.RawOutputDataConfig != rawOutputDataConfigCopy.RawOutputDataConfig) + assert.True(t, proto.Equal(rawOutputDataConfig.RawOutputDataConfig, rawOutputDataConfigCopy.RawOutputDataConfig)) +} + +func TestExecutionConfigDeepCopy(t *testing.T) { + // 1. Create an ExecutionConfig object (including the wrapper object - WorkflowExecutionIdentifier) + interruptible := true + executionConfig := &ExecutionConfig{ + TaskPluginImpls: map[string]TaskPluginOverride{}, + MaxParallelism: 32, + RecoveryExecution: WorkflowExecutionIdentifier{ + WorkflowExecutionIdentifier: &core.WorkflowExecutionIdentifier{ + Project: "project", + Domain: "domain", + Org: "organization", + Name: "name", + }, + }, + TaskResources: TaskResources{ + Requests: TaskResourceSpec{ + CPU: resource.Quantity{ + Format: "1", + }, + Memory: resource.Quantity{ + Format: "1Gi", + }, + }, + }, + Interruptible: &interruptible, + OverwriteCache: false, + EnvironmentVariables: map[string]string{ + "key": "value", + }, + } + + // 2. Deep copy the wrapper object + executionConfigCopy := executionConfig.DeepCopy() + + // 3. Assert that the pointers are different + assert.True(t, executionConfig.RecoveryExecution.WorkflowExecutionIdentifier != executionConfigCopy.RecoveryExecution.WorkflowExecutionIdentifier) + + // 4. Assert that the values are the same + assert.True(t, proto.Equal(executionConfig.RecoveryExecution.WorkflowExecutionIdentifier, executionConfigCopy.RecoveryExecution.WorkflowExecutionIdentifier)) + assert.Equal(t, executionConfig, executionConfigCopy) +} diff --git a/flytepropeller/pkg/apis/flyteworkflow/v1alpha1/identifier.go b/flytepropeller/pkg/apis/flyteworkflow/v1alpha1/identifier.go index 7d6a3622c8..526b5c4cf4 100644 --- a/flytepropeller/pkg/apis/flyteworkflow/v1alpha1/identifier.go +++ b/flytepropeller/pkg/apis/flyteworkflow/v1alpha1/identifier.go @@ -4,6 +4,7 @@ import ( "bytes" "github.com/golang/protobuf/jsonpb" + "google.golang.org/protobuf/proto" "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/core" ) @@ -34,7 +35,7 @@ type WorkflowExecutionIdentifier struct { } func (in *WorkflowExecutionIdentifier) DeepCopyInto(out *WorkflowExecutionIdentifier) { - *out = *in + out.WorkflowExecutionIdentifier = proto.Clone(in.WorkflowExecutionIdentifier).(*core.WorkflowExecutionIdentifier) } type TaskExecutionIdentifier struct { diff --git a/flytepropeller/pkg/apis/flyteworkflow/v1alpha1/workflow.go b/flytepropeller/pkg/apis/flyteworkflow/v1alpha1/workflow.go index e42d492999..c35c5d6fd6 100644 --- a/flytepropeller/pkg/apis/flyteworkflow/v1alpha1/workflow.go +++ b/flytepropeller/pkg/apis/flyteworkflow/v1alpha1/workflow.go @@ -7,6 +7,7 @@ import ( "github.com/golang/protobuf/jsonpb" "github.com/pkg/errors" + "google.golang.org/protobuf/proto" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/types" @@ -277,11 +278,8 @@ func (in *Inputs) MarshalJSON() ([]byte, error) { return buf.Bytes(), nil } -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *Inputs) DeepCopyInto(out *Inputs) { - *out = *in - // We do not manipulate the object, so its ok - // Once we figure out the autogenerate story we can replace this + out.LiteralMap = proto.Clone(in.LiteralMap).(*core.LiteralMap) } // Deprecated: Please use Connections instead diff --git a/flytepropeller/pkg/apis/flyteworkflow/v1alpha1/workflow_test.go b/flytepropeller/pkg/apis/flyteworkflow/v1alpha1/workflow_test.go index 6e72b95ec7..3d3f5aac42 100644 --- a/flytepropeller/pkg/apis/flyteworkflow/v1alpha1/workflow_test.go +++ b/flytepropeller/pkg/apis/flyteworkflow/v1alpha1/workflow_test.go @@ -7,8 +7,10 @@ import ( "github.com/ghodss/yaml" "github.com/stretchr/testify/assert" + "google.golang.org/protobuf/proto" "k8s.io/apimachinery/pkg/util/sets" + "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/core" "github.com/flyteorg/flyte/flytepropeller/pkg/apis/flyteworkflow/v1alpha1" ) @@ -79,3 +81,60 @@ func TestWorkflowIsInterruptible(t *testing.T) { w.NodeDefaults.Interruptible = true assert.True(t, w.IsInterruptible()) } + +// w := &v1alpha1.FlyteWorkflow{ +// Inputs: v1alpha1.Inputs{ +// &core.LiteralMap{ +// Literals: map[string]*core.Literal{ +// "p1": { +// Value: &core.Literal_Scalar{ +// Scalar: &core.Scalar{ +// Value: &core.Scalar_Primitive{ +// Primitive: &core.Primitive{ +// Value: &core.Primitive_Integer{ +// Integer: 1, +// }, +// }, +// }, +// }, +// }, +// }, +// }, +// }, +// }, +// } + +func TestWrappedInputsDeepCopy(t *testing.T) { + // 1. Setup proto + litMap := core.LiteralMap{ + Literals: map[string]*core.Literal{ + "p1": { + Value: &core.Literal_Scalar{ + Scalar: &core.Scalar{ + Value: &core.Scalar_Primitive{ + Primitive: &core.Primitive{ + Value: &core.Primitive_Integer{ + Integer: 1, + }, + }, + }, + }, + }, + }, + }, + } + + // 2. Define wrapper + inputs := v1alpha1.Inputs{ + &litMap, + } + + // 3. Deep copy + inputsCopy := inputs.DeepCopy() + + // 4. Assert that pointers are different + assert.True(t, inputs.LiteralMap != inputsCopy.LiteralMap) + + // 5. Assert that the content is the same + assert.True(t, proto.Equal(inputs.LiteralMap, inputsCopy.LiteralMap)) +} From e6d2e0123fd31f5dfebd3c4c509c0620b35d1d27 Mon Sep 17 00:00:00 2001 From: Eduardo Apolinario Date: Fri, 7 Jun 2024 18:11:56 -0700 Subject: [PATCH 09/19] Renew FlyteWorkflow autogenerated code Signed-off-by: Eduardo Apolinario --- .../v1alpha1/zz_generated.deepcopy.go | 79 +++++++++++++++++++ 1 file changed, 79 insertions(+) diff --git a/flytepropeller/pkg/apis/flyteworkflow/v1alpha1/zz_generated.deepcopy.go b/flytepropeller/pkg/apis/flyteworkflow/v1alpha1/zz_generated.deepcopy.go index dbfbd4c734..cd08078996 100644 --- a/flytepropeller/pkg/apis/flyteworkflow/v1alpha1/zz_generated.deepcopy.go +++ b/flytepropeller/pkg/apis/flyteworkflow/v1alpha1/zz_generated.deepcopy.go @@ -264,6 +264,75 @@ func (in *ExtendedResources) DeepCopy() *ExtendedResources { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *FlyteWorkflow) DeepCopyInto(out *FlyteWorkflow) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + if in.WorkflowSpec != nil { + in, out := &in.WorkflowSpec, &out.WorkflowSpec + *out = new(WorkflowSpec) + (*in).DeepCopyInto(*out) + } + if in.WorkflowMeta != nil { + in, out := &in.WorkflowMeta, &out.WorkflowMeta + *out = new(WorkflowMeta) + **out = **in + } + if in.Inputs != nil { + in, out := &in.Inputs, &out.Inputs + *out = (*in).DeepCopy() + } + in.ExecutionID.DeepCopyInto(&out.ExecutionID) + if in.Tasks != nil { + in, out := &in.Tasks, &out.Tasks + *out = make(map[string]*TaskSpec, len(*in)) + for key, val := range *in { + var outVal *TaskSpec + if val == nil { + (*out)[key] = nil + } else { + in, out := &val, &outVal + *out = (*in).DeepCopy() + } + (*out)[key] = outVal + } + } + if in.SubWorkflows != nil { + in, out := &in.SubWorkflows, &out.SubWorkflows + *out = make(map[string]*WorkflowSpec, len(*in)) + for key, val := range *in { + var outVal *WorkflowSpec + if val == nil { + (*out)[key] = nil + } else { + in, out := &val, &outVal + *out = new(WorkflowSpec) + (*in).DeepCopyInto(*out) + } + (*out)[key] = outVal + } + } + if in.ActiveDeadlineSeconds != nil { + in, out := &in.ActiveDeadlineSeconds, &out.ActiveDeadlineSeconds + *out = new(int64) + **out = **in + } + out.NodeDefaults = in.NodeDefaults + if in.AcceptedAt != nil { + in, out := &in.AcceptedAt, &out.AcceptedAt + *out = (*in).DeepCopy() + } + in.SecurityContext.DeepCopyInto(&out.SecurityContext) + in.Status.DeepCopyInto(&out.Status) + in.RawOutputDataConfig.DeepCopyInto(&out.RawOutputDataConfig) + in.ExecutionConfig.DeepCopyInto(&out.ExecutionConfig) + if in.DataReferenceConstructor != nil { + out.DataReferenceConstructor = in.DataReferenceConstructor.DeepCopyReferenceConstructor() + } + return +} + // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FlyteWorkflow. func (in *FlyteWorkflow) DeepCopy() *FlyteWorkflow { if in == nil { @@ -609,6 +678,16 @@ func (in *RetryStrategy) DeepCopy() *RetryStrategy { return out } +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SecurityContext. +func (in *SecurityContext) DeepCopy() *SecurityContext { + if in == nil { + return nil + } + out := new(SecurityContext) + in.DeepCopyInto(out) + return out +} + // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SignalCondition. func (in *SignalCondition) DeepCopy() *SignalCondition { if in == nil { From e1536c43087d81de7f428dad4ef4013b96f7ffd6 Mon Sep 17 00:00:00 2001 From: Eduardo Apolinario Date: Fri, 7 Jun 2024 18:12:29 -0700 Subject: [PATCH 10/19] Add DeepCopyReferenceConstructor to ReferenceConstructor interface Signed-off-by: Eduardo Apolinario --- .../storage/mocks/reference_constructor.go | 34 +++++++++++++++++++ flytestdlib/storage/storage.go | 4 +++ flytestdlib/storage/url_path.go | 4 +++ 3 files changed, 42 insertions(+) diff --git a/flytestdlib/storage/mocks/reference_constructor.go b/flytestdlib/storage/mocks/reference_constructor.go index 85619d505e..52b526338a 100644 --- a/flytestdlib/storage/mocks/reference_constructor.go +++ b/flytestdlib/storage/mocks/reference_constructor.go @@ -59,3 +59,37 @@ func (_m *ReferenceConstructor) ConstructReference(ctx context.Context, referenc return r0, r1 } + +type ReferenceConstructor_DeepCopyReferenceConstructor struct { + *mock.Call +} + +func (_m ReferenceConstructor_DeepCopyReferenceConstructor) Return(_a0 storage.ReferenceConstructor) *ReferenceConstructor_DeepCopyReferenceConstructor { + return &ReferenceConstructor_DeepCopyReferenceConstructor{Call: _m.Call.Return(_a0)} +} + +func (_m *ReferenceConstructor) OnDeepCopyReferenceConstructor() *ReferenceConstructor_DeepCopyReferenceConstructor { + c_call := _m.On("DeepCopyReferenceConstructor") + return &ReferenceConstructor_DeepCopyReferenceConstructor{Call: c_call} +} + +func (_m *ReferenceConstructor) OnDeepCopyReferenceConstructorMatch(matchers ...interface{}) *ReferenceConstructor_DeepCopyReferenceConstructor { + c_call := _m.On("DeepCopyReferenceConstructor", matchers...) + return &ReferenceConstructor_DeepCopyReferenceConstructor{Call: c_call} +} + +// DeepCopyReferenceConstructor provides a mock function with given fields: +func (_m *ReferenceConstructor) DeepCopyReferenceConstructor() storage.ReferenceConstructor { + ret := _m.Called() + + var r0 storage.ReferenceConstructor + if rf, ok := ret.Get(0).(func() storage.ReferenceConstructor); ok { + r0 = rf() + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(storage.ReferenceConstructor) + } + } + + return r0 +} diff --git a/flytestdlib/storage/storage.go b/flytestdlib/storage/storage.go index 3e84cb7acb..cb4db553e1 100644 --- a/flytestdlib/storage/storage.go +++ b/flytestdlib/storage/storage.go @@ -98,6 +98,10 @@ type ReferenceConstructor interface { // ConstructReference creates a new dataReference that matches the storage structure. ConstructReference(ctx context.Context, reference DataReference, nestedKeys ...string) (DataReference, error) + // Explain that in order for this interface to be part of a CRD we need to implement a DeepCopy method as per + // https://pkg.go.dev/k8s.io/gengo/examples/deepcopy-gen. + DeepCopyReferenceConstructor() ReferenceConstructor + // FromSignedURL constructs a data reference from a signed URL //FromSignedURL(ctx context.Context, signedURL string) (DataReference, error) } diff --git a/flytestdlib/storage/url_path.go b/flytestdlib/storage/url_path.go index 3aef478084..66a58fae8b 100644 --- a/flytestdlib/storage/url_path.go +++ b/flytestdlib/storage/url_path.go @@ -47,6 +47,10 @@ func (URLPathConstructor) ConstructReference(ctx context.Context, reference Data return DataReference(u.String()), nil } +func (URLPathConstructor) DeepCopyReferenceConstructor() ReferenceConstructor { + return NewURLPathConstructor() +} + func NewURLPathConstructor() URLPathConstructor { return URLPathConstructor{} } From c3abe4229c35d0b2b0ca594506540962f19223bc Mon Sep 17 00:00:00 2001 From: Eduardo Apolinario Date: Fri, 7 Jun 2024 18:13:03 -0700 Subject: [PATCH 11/19] Add Tests to cover FlyteWorkflow - specifically SecurityContext Signed-off-by: Eduardo Apolinario --- .../apis/flyteworkflow/v1alpha1/identifier.go | 4 +- .../v1alpha1/testdata/workflowspec.yaml | 263 +++++++----------- .../apis/flyteworkflow/v1alpha1/workflow.go | 104 +++---- .../flyteworkflow/v1alpha1/workflow_test.go | 195 +++++++++++++ 4 files changed, 324 insertions(+), 242 deletions(-) diff --git a/flytepropeller/pkg/apis/flyteworkflow/v1alpha1/identifier.go b/flytepropeller/pkg/apis/flyteworkflow/v1alpha1/identifier.go index 526b5c4cf4..9bd11e6599 100644 --- a/flytepropeller/pkg/apis/flyteworkflow/v1alpha1/identifier.go +++ b/flytepropeller/pkg/apis/flyteworkflow/v1alpha1/identifier.go @@ -27,7 +27,7 @@ func (in *Identifier) MarshalJSON() ([]byte, error) { } func (in *Identifier) DeepCopyInto(out *Identifier) { - *out = *in + out.Identifier = proto.Clone(in.Identifier).(*core.Identifier) } type WorkflowExecutionIdentifier struct { @@ -43,5 +43,5 @@ type TaskExecutionIdentifier struct { } func (in *TaskExecutionIdentifier) DeepCopyInto(out *TaskExecutionIdentifier) { - *out = *in + out.TaskExecutionIdentifier = proto.Clone(in.TaskExecutionIdentifier).(*core.TaskExecutionIdentifier) } diff --git a/flytepropeller/pkg/apis/flyteworkflow/v1alpha1/testdata/workflowspec.yaml b/flytepropeller/pkg/apis/flyteworkflow/v1alpha1/testdata/workflowspec.yaml index c83f8182b9..21fc3ad694 100644 --- a/flytepropeller/pkg/apis/flyteworkflow/v1alpha1/testdata/workflowspec.yaml +++ b/flytepropeller/pkg/apis/flyteworkflow/v1alpha1/testdata/workflowspec.yaml @@ -1,207 +1,88 @@ -workflow.apiVersion: flyte.lyft.com/v1alpha1 kind: flyteworkflow metadata: - creationTimestamp: null generateName: dummy-workflow-1-0- + creationTimestamp: null labels: execution-id: "" workflow-id: dummy-workflow-1-0 -inputs: - literals: - triggered_date: - scalar: - primitive: - datetime: 2018-08-01T18:09:18Z spec: - connections: - add-one-and-print-0: - - sum-non-none-0 - add-one-and-print-1: - - add-one-and-print-2 - - sum-and-print-0 - add-one-and-print-2: - - sum-and-print-0 - add-one-and-print-3: - - sum-non-none-0 - start-node: - - add-one-and-print-0 - - add-one-and-print-3 - - print-every-time-0 - sum-and-print-0: - - end-node - - print-every-time-0 - sum-non-none-0: - - add-one-and-print-1 - - sum-and-print-0 id: dummy-workflow-1-0 nodes: add-one-and-print-0: - activeDeadlineSeconds: 0 id: add-one-and-print-0 - input_bindings: - - binding: - scalar: - primitive: - integer: "3" - var: value_to_print - kind: task resources: {} - status: - phase: 0 - task_ref: add-one-and-print + kind: task add-one-and-print-1: - activeDeadlineSeconds: 0 id: add-one-and-print-1 - input_bindings: - - binding: - promise: - nodeId: sum-non-none-0 - var: out - var: value_to_print - kind: task resources: {} - status: - phase: 0 - task_ref: add-one-and-print + kind: task add-one-and-print-2: - activeDeadlineSeconds: 0 id: add-one-and-print-2 - input_bindings: - - binding: - promise: - nodeId: add-one-and-print-1 - var: out - var: value_to_print - kind: task resources: {} - status: - phase: 0 - task_ref: add-one-and-print + kind: task add-one-and-print-3: - activeDeadlineSeconds: 0 id: add-one-and-print-3 - input_bindings: - - binding: - scalar: - primitive: - integer: "101" - var: value_to_print - kind: task resources: {} - status: - phase: 0 - task_ref: add-one-and-print + kind: task end-node: id: end-node - input_bindings: - - binding: - promise: - nodeId: sum-and-print-0 - var: out - var: output - kind: end resources: {} - status: - phase: 0 + kind: end print-every-time-0: - activeDeadlineSeconds: 0 id: print-every-time-0 - input_bindings: - - binding: - promise: - nodeId: start-node - var: triggered_date - var: date_triggered - - binding: - promise: - nodeId: sum-and-print-0 - var: out_blob - var: in_blob - - binding: - promise: - nodeId: sum-and-print-0 - var: multi_blob - var: multi_blob - - binding: - promise: - nodeId: sum-and-print-0 - var: out - var: value_to_print - kind: task resources: {} - status: - phase: 0 - task_ref: print-every-time + kind: task start-node: id: start-node - kind: start resources: {} - status: - phase: 0 + kind: start sum-and-print-0: - activeDeadlineSeconds: 0 id: sum-and-print-0 - input_bindings: - - binding: - collection: - bindings: - - promise: - nodeId: sum-non-none-0 - var: out - - promise: - nodeId: add-one-and-print-1 - var: out - - promise: - nodeId: add-one-and-print-2 - var: out - - scalar: - primitive: - integer: "100" - var: values_to_add - kind: task resources: {} - status: - phase: 0 - task_ref: sum-and-print + kind: task sum-non-none-0: - activeDeadlineSeconds: 0 id: sum-non-none-0 - input_bindings: - - binding: - collection: - bindings: - - promise: - nodeId: add-one-and-print-0 - var: out - - promise: - nodeId: add-one-and-print-3 - var: out - var: values_to_print - kind: task resources: {} - status: - phase: 0 - task_ref: sum-non-none -status: - phase: 0 + kind: task + connections: + add-one-and-print-0: + - sum-non-none-0 + add-one-and-print-1: + - add-one-and-print-2 + - sum-and-print-0 + add-one-and-print-2: + - sum-and-print-0 + add-one-and-print-3: + - sum-non-none-0 + start-node: + - add-one-and-print-0 + - add-one-and-print-3 + - print-every-time-0 + sum-and-print-0: + - end-node + - print-every-time-0 + sum-non-none-0: + - add-one-and-print-1 + - sum-and-print-0 + edges: + downstream: null + upstream: null +inputs: + literals: + triggered_date: + scalar: + primitive: + datetime: "2018-08-01T18:09:18Z" +executionId: {} tasks: add-one-and-print: - container: - args: - - --task-module=flytekit.examples.tasks - - --task-name=add_one_and_print - - --inputs={{$input}} - - --output-prefix={{$output}} - command: - - flyte-python-entrypoint - image: myflyteimage:abc123 - resources: - requests: - - value: "0.000" - - value: "2.000" - - value: 2048Mi id: name: add-one-and-print + type: "7" + metadata: + runtime: + version: 1.19.0b7 + timeout: 0s interface: inputs: variables: @@ -213,8 +94,52 @@ tasks: out: type: simple: INTEGER - metadata: - runtime: - version: 1.19.0b7 - timeout: 0s - type: "7" + container: + image: myflyteimage:abc123 + command: + - flyte-python-entrypoint + args: + - --task-module=flytekit.examples.tasks + - --task-name=add_one_and_print + - --inputs={{$input}} + - --output-prefix={{$output}} + resources: + requests: + - value: "0.000" + - value: "2.000" + - value: 2048Mi +node-defaults: {} +securityContext: + run_as: + iam_role: abc-def + k8s_service_account: service-account + oauth2_client: + client_id: client-id + client_secret: + group: group + group_version: group-version + key: key + execution_identity: execution-identity +status: + phase: 0 +rawOutputDataConfig: {} +executionConfig: + TaskPluginImpls: null + MaxParallelism: 0 + RecoveryExecution: {} + TaskResources: + Requests: + CPU: "0" + Memory: "0" + EphemeralStorage: "0" + Storage: "0" + GPU: "0" + Limits: + CPU: "0" + Memory: "0" + EphemeralStorage: "0" + Storage: "0" + GPU: "0" + Interruptible: null + OverwriteCache: false + EnvironmentVariables: null diff --git a/flytepropeller/pkg/apis/flyteworkflow/v1alpha1/workflow.go b/flytepropeller/pkg/apis/flyteworkflow/v1alpha1/workflow.go index c35c5d6fd6..797fa824cf 100644 --- a/flytepropeller/pkg/apis/flyteworkflow/v1alpha1/workflow.go +++ b/flytepropeller/pkg/apis/flyteworkflow/v1alpha1/workflow.go @@ -59,7 +59,7 @@ type FlyteWorkflow struct { ServiceAccountName string `json:"serviceAccountName,omitempty" protobuf:"bytes,8,opt,name=serviceAccountName"` // Security context fields to define privilege and access control settings // +optional - SecurityContext core.SecurityContext `json:"securityContext,omitempty" protobuf:"bytes,12,rep,name=securityContext"` + SecurityContext SecurityContext `json:"securityContext,omitempty" protobuf:"bytes,12,rep,name=securityContext"` // Status is the only mutable section in the workflow. It holds all the execution information Status WorkflowStatus `json:"status,omitempty"` // RawOutputDataConfig defines the configurations to use for generating raw outputs (e.g. blobs, schemas). @@ -80,79 +80,16 @@ type FlyteWorkflow struct { WorkflowClosureReference DataReference `json:"workflowClosureReference,omitempty"` } -// FlyteWorkflow contains at least one proto message directly, which means that we need to -// implement DeepCopyInto since the generated proto messages do not implement that function. -func (in *FlyteWorkflow) DeepCopyInto(out *FlyteWorkflow) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - if in.WorkflowSpec != nil { - in, out := &in.WorkflowSpec, &out.WorkflowSpec - *out = new(WorkflowSpec) - (*in).DeepCopyInto(*out) - } - if in.WorkflowMeta != nil { - in, out := &in.WorkflowMeta, &out.WorkflowMeta - *out = new(WorkflowMeta) - **out = **in - } - if in.Inputs != nil { - in, out := &in.Inputs, &out.Inputs - *out = (*in).DeepCopy() - } - in.ExecutionID.DeepCopyInto(&out.ExecutionID) - if in.Tasks != nil { - in, out := &in.Tasks, &out.Tasks - *out = make(map[string]*TaskSpec, len(*in)) - for key, v := range *in { - val := v - var outVal *TaskSpec - if val == nil { - (*out)[key] = nil - } else { - in, out := &val, &outVal - *out = (*in).DeepCopy() - } - (*out)[key] = outVal - } - } - if in.SubWorkflows != nil { - in, out := &in.SubWorkflows, &out.SubWorkflows - *out = make(map[string]*WorkflowSpec, len(*in)) - for key, v := range *in { - val := v - var outVal *WorkflowSpec - if val == nil { - (*out)[key] = nil - } else { - in, out := &val, &outVal - *out = new(WorkflowSpec) - (*in).DeepCopyInto(*out) - } - (*out)[key] = outVal - } - } - if in.ActiveDeadlineSeconds != nil { - in, out := &in.ActiveDeadlineSeconds, &out.ActiveDeadlineSeconds - *out = new(int64) - **out = **in - } - out.NodeDefaults = in.NodeDefaults - if in.AcceptedAt != nil { - in, out := &in.AcceptedAt, &out.AcceptedAt - *out = (*in).DeepCopy() - } - out.SecurityContext = in.SecurityContext - in.Status.DeepCopyInto(&out.Status) - in.RawOutputDataConfig.DeepCopyInto(&out.RawOutputDataConfig) - in.ExecutionConfig.DeepCopyInto(&out.ExecutionConfig) - if in.DataReferenceConstructor != nil { - out.DataReferenceConstructor = in.DataReferenceConstructor - } +type SecurityContext struct { + core.SecurityContext +} + +func (in *SecurityContext) DeepCopyInto(out *SecurityContext) { + out.SecurityContext = *proto.Clone(&in.SecurityContext).(*core.SecurityContext) } func (in *FlyteWorkflow) GetSecurityContext() core.SecurityContext { - return in.SecurityContext + return in.SecurityContext.SecurityContext } func (in *FlyteWorkflow) GetEventVersion() EventVersion { @@ -257,6 +194,31 @@ func (in *FlyteWorkflow) GetRawOutputDataConfig() RawOutputDataConfig { return in.RawOutputDataConfig } +// type SecurityContext struct { +// *core.SecurityContext +// } + +// func (in *SecurityContext) UnmarshalJSON(b []byte) error { +// in.SecurityContext = &core.SecurityContext{} +// return jsonpb.Unmarshal(bytes.NewReader(b), in.SecurityContext) +// } + +// func (in *SecurityContext) MarshalJSON() ([]byte, error) { +// if in == nil || in.SecurityContext == nil { +// return nilJSON, nil +// } + +// var buf bytes.Buffer +// if err := marshaler.Marshal(&buf, in.SecurityContext); err != nil { +// return nil, err +// } +// return buf.Bytes(), nil +// } + +// func (in *SecurityContext) DeepCopyInto(out *SecurityContext) { +// out.SecurityContext = proto.Clone(in.SecurityContext).(*core.SecurityContext) +// } + type Inputs struct { *core.LiteralMap } diff --git a/flytepropeller/pkg/apis/flyteworkflow/v1alpha1/workflow_test.go b/flytepropeller/pkg/apis/flyteworkflow/v1alpha1/workflow_test.go index 3d3f5aac42..c15289e257 100644 --- a/flytepropeller/pkg/apis/flyteworkflow/v1alpha1/workflow_test.go +++ b/flytepropeller/pkg/apis/flyteworkflow/v1alpha1/workflow_test.go @@ -4,14 +4,18 @@ import ( "encoding/json" "io/ioutil" "testing" + "time" "github.com/ghodss/yaml" "github.com/stretchr/testify/assert" "google.golang.org/protobuf/proto" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/util/sets" + "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin" "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/core" "github.com/flyteorg/flyte/flytepropeller/pkg/apis/flyteworkflow/v1alpha1" + "github.com/flyteorg/flyte/flytestdlib/storage" ) func TestMarshalUnmarshal_Connections(t *testing.T) { @@ -53,6 +57,197 @@ func TestWorkflowSpec(t *testing.T) { assert.Nil(t, w.GetOnFailureNode()) assert.Equal(t, 7, len(w.GetConnections().Downstream)) assert.Equal(t, 8, len(w.GetConnections().Upstream)) + expectedSecurityContext := v1alpha1.SecurityContext{ + core.SecurityContext{ + RunAs: &core.Identity{ + IamRole: "abc-def", + K8SServiceAccount: "service-account", + Oauth2Client: &core.OAuth2Client{ + ClientId: "client-id", + ClientSecret: &core.Secret{ + Group: "group", + GroupVersion: "group-version", + Key: "key", + }, + }, + ExecutionIdentity: "execution-identity", + }, + }, + } + securityContext := w.GetSecurityContext() + assert.True(t, proto.Equal(&securityContext, &expectedSecurityContext)) +} + +func TestWrappedValuesInFlyteWorkflow(t *testing.T) { + j, err := ReadYamlFileAsJSON("testdata/workflowspec.yaml") + assert.NoError(t, err) + w := &v1alpha1.FlyteWorkflow{} + err = json.Unmarshal(j, w) + if !assert.NoError(t, err) { + t.FailNow() + } + + wCopy := w.DeepCopy() + + wSecurityContext := w.GetSecurityContext() + wCopySecurityContext := wCopy.GetSecurityContext() + assert.True(t, proto.Equal(&wSecurityContext, &wCopySecurityContext)) + +} + +func TestWorkflow(t *testing.T) { + // Instantiate a new workflow, but be as comprehensive as possible. + // This is a bit of a pain, but it's the only way to ensure that the defaults are set correctly. + w := &v1alpha1.FlyteWorkflow{ + WorkflowSpec: &v1alpha1.WorkflowSpec{ + ID: v1alpha1.WorkflowID("some-id"), + Nodes: map[v1alpha1.NodeID]*v1alpha1.NodeSpec{}, + Connections: v1alpha1.Connections{ + Downstream: map[v1alpha1.NodeID][]v1alpha1.NodeID{}, + Upstream: map[v1alpha1.NodeID][]v1alpha1.NodeID{}, + }, + }, + WorkflowMeta: &v1alpha1.WorkflowMeta{ + EventVersion: 42, + }, + Inputs: &v1alpha1.Inputs{ + &core.LiteralMap{ + Literals: map[string]*core.Literal{ + "input1": { + Value: &core.Literal_Scalar{ + Scalar: &core.Scalar{ + Value: &core.Scalar_Primitive{ + Primitive: &core.Primitive{ + Value: &core.Primitive_Integer{ + Integer: 1, + }, + }, + }, + }, + }, + }, + }, + }, + }, + ExecutionID: v1alpha1.WorkflowExecutionIdentifier{ + &core.WorkflowExecutionIdentifier{ + Project: "project", + Domain: "domain", + Name: "name", + Org: "org", + }, + }, + Tasks: map[v1alpha1.TaskID]*v1alpha1.TaskSpec{ + "task1": &v1alpha1.TaskSpec{ + &core.TaskTemplate{ + Id: &core.Identifier{ + ResourceType: core.ResourceType_TASK, + Project: "project", + Domain: "domain", + Name: "name", + Version: "version", + }, + Interface: &core.TypedInterface{ + Inputs: &core.VariableMap{ + Variables: map[string]*core.Variable{ + "input1": { + Type: &core.LiteralType{ + Type: &core.LiteralType_Simple{ + Simple: core.SimpleType_INTEGER, + }, + }, + }, + }, + }, + }, + }, + }, + }, + ActiveDeadlineSeconds: proto.Int64(42), + NodeDefaults: v1alpha1.NodeDefaults{ + Interruptible: true, + }, + AcceptedAt: &metav1.Time{ + Time: time.Now(), + }, + SecurityContext: v1alpha1.SecurityContext{ + core.SecurityContext{ + RunAs: &core.Identity{ + IamRole: "abc-def", + K8SServiceAccount: "service-account", + Oauth2Client: &core.OAuth2Client{ + ClientId: "client-id", + ClientSecret: &core.Secret{ + Group: "group", + GroupVersion: "group-version", + Key: "key", + }, + }, + ExecutionIdentity: "execution-identity", + }, + }, + }, + Status: v1alpha1.WorkflowStatus{ + Phase: v1alpha1.WorkflowPhase(41), + StartedAt: &metav1.Time{ + Time: time.Now(), + }, + StoppedAt: &metav1.Time{ + Time: time.Now(), + }, + LastUpdatedAt: &metav1.Time{ + Time: time.Now(), + }, + Message: "message", + DataDir: storage.DataReference("data-dir"), + OutputReference: storage.DataReference("output-reference"), + NodeStatus: map[string]*v1alpha1.NodeStatus{}, + FailedAttempts: 32, + Error: &v1alpha1.ExecutionError{ + &core.ExecutionError{ + Code: "code", + Message: "message", + }, + }, + }, + RawOutputDataConfig: v1alpha1.RawOutputDataConfig{ + &admin.RawOutputDataConfig{ + OutputLocationPrefix: "output-location-prefix", + }, + }, + ExecutionConfig: v1alpha1.ExecutionConfig{ + TaskPluginImpls: map[string]v1alpha1.TaskPluginOverride{}, + MaxParallelism: 42, + RecoveryExecution: v1alpha1.WorkflowExecutionIdentifier{ + &core.WorkflowExecutionIdentifier{ + Project: "project", + Domain: "domain", + Name: "name", + Org: "org", + }, + }, + }, + DataReferenceConstructor: storage.URLPathConstructor{}, + WorkflowClosureReference: v1alpha1.DataReference( + storage.DataReference("data-reference"), + ), + } + + wCopy := w.DeepCopy() + + // Test that the pointers are different. + assert.NotSame(t, w, wCopy) + + assert.True(t, w.WorkflowSpec != wCopy.WorkflowSpec) + assert.Equal(t, w.WorkflowSpec, wCopy.WorkflowSpec) + assert.True(t, w.WorkflowMeta != wCopy.WorkflowMeta) + assert.Equal(t, w.WorkflowMeta, wCopy.WorkflowMeta) + assert.True(t, w.Inputs != wCopy.Inputs) + assert.Equal(t, w.Inputs, wCopy.Inputs) + + wSecurityContext := w.GetSecurityContext() + wCopySecurityContext := wCopy.GetSecurityContext() + assert.True(t, proto.Equal(&wSecurityContext, &wCopySecurityContext)) } func TestWorkflowIsInterruptible(t *testing.T) { From c70d923bd0fc25cf8c1e4d9af67b771af0f63def Mon Sep 17 00:00:00 2001 From: Eduardo Apolinario Date: Fri, 7 Jun 2024 18:25:28 -0700 Subject: [PATCH 12/19] Use the SecurityContext and Error wrappers Signed-off-by: Eduardo Apolinario --- flyteadmin/pkg/workflowengine/impl/prepare_execution.go | 2 +- flytepropeller/pkg/compiler/transformers/k8s/node.go | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/flyteadmin/pkg/workflowengine/impl/prepare_execution.go b/flyteadmin/pkg/workflowengine/impl/prepare_execution.go index 91642599a6..24e4f611cd 100644 --- a/flyteadmin/pkg/workflowengine/impl/prepare_execution.go +++ b/flyteadmin/pkg/workflowengine/impl/prepare_execution.go @@ -28,7 +28,7 @@ func addPermissions(securityCtx *core.SecurityContext, roleNameKey string, flyte if securityCtx == nil || securityCtx.RunAs == nil { return } - flyteWf.SecurityContext = *securityCtx + flyteWf.SecurityContext = v1alpha1.SecurityContext{*securityCtx} if len(securityCtx.RunAs.IamRole) > 0 { if flyteWf.Annotations == nil { flyteWf.Annotations = map[string]string{} diff --git a/flytepropeller/pkg/compiler/transformers/k8s/node.go b/flytepropeller/pkg/compiler/transformers/k8s/node.go index 8a4c9248ec..e7bb4750df 100644 --- a/flytepropeller/pkg/compiler/transformers/k8s/node.go +++ b/flytepropeller/pkg/compiler/transformers/k8s/node.go @@ -241,7 +241,10 @@ func buildBranchNodeSpec(branch *core.BranchNode, tasks []*core.CompiledTask, er childNodes = append(childNodes, ns...) res.Else = refStr(branch.IfElse.GetElseNode().Id) case *core.IfElseBlock_Error: - res.ElseFail = branch.IfElse.GetError() + coreError := branch.IfElse.GetError() + res.ElseFail = &v1alpha1.Error{ + coreError, + } } other := make([]*v1alpha1.IfBlock, 0, len(branch.IfElse.Other)) From 076695b7170c1975faecce21522e80d321064170 Mon Sep 17 00:00:00 2001 From: Eduardo Apolinario Date: Mon, 10 Jun 2024 16:53:20 -0700 Subject: [PATCH 13/19] Fix lint errors and tests Signed-off-by: Eduardo Apolinario --- flyteadmin/pkg/common/mocks/storage.go | 4 ++++ flyteadmin/pkg/workflowengine/impl/prepare_execution.go | 2 +- flytepropeller/pkg/apis/flyteworkflow/v1alpha1/branch.go | 3 +++ .../pkg/apis/flyteworkflow/v1alpha1/branch_test.go | 2 +- .../pkg/apis/flyteworkflow/v1alpha1/workflow_test.go | 4 +--- flytepropeller/pkg/compiler/transformers/k8s/node.go | 2 +- .../pkg/controller/nodes/branch/evaluator_test.go | 6 ++++-- 7 files changed, 15 insertions(+), 8 deletions(-) diff --git a/flyteadmin/pkg/common/mocks/storage.go b/flyteadmin/pkg/common/mocks/storage.go index 7e91bf0485..ca682c321e 100644 --- a/flyteadmin/pkg/common/mocks/storage.go +++ b/flyteadmin/pkg/common/mocks/storage.go @@ -83,6 +83,10 @@ func (t *TestDataStore) Delete(ctx context.Context, reference storage.DataRefere return t.DeleteCb(ctx, reference) } +func (t *TestDataStore) DeepCopyReferenceConstructor() storage.ReferenceConstructor { + return nil +} + func GetMockStorageClient() *storage.DataStore { mockStorageClient := TestDataStore{ Store: make(map[storage.DataReference][]byte), diff --git a/flyteadmin/pkg/workflowengine/impl/prepare_execution.go b/flyteadmin/pkg/workflowengine/impl/prepare_execution.go index 24e4f611cd..b4b47cb861 100644 --- a/flyteadmin/pkg/workflowengine/impl/prepare_execution.go +++ b/flyteadmin/pkg/workflowengine/impl/prepare_execution.go @@ -28,7 +28,7 @@ func addPermissions(securityCtx *core.SecurityContext, roleNameKey string, flyte if securityCtx == nil || securityCtx.RunAs == nil { return } - flyteWf.SecurityContext = v1alpha1.SecurityContext{*securityCtx} + flyteWf.SecurityContext = v1alpha1.SecurityContext{SecurityContext: *securityCtx} if len(securityCtx.RunAs.IamRole) > 0 { if flyteWf.Annotations == nil { flyteWf.Annotations = map[string]string{} diff --git a/flytepropeller/pkg/apis/flyteworkflow/v1alpha1/branch.go b/flytepropeller/pkg/apis/flyteworkflow/v1alpha1/branch.go index 86ce6bc7ba..8d542e2d0f 100644 --- a/flytepropeller/pkg/apis/flyteworkflow/v1alpha1/branch.go +++ b/flytepropeller/pkg/apis/flyteworkflow/v1alpha1/branch.go @@ -96,5 +96,8 @@ func (in *BranchNodeSpec) GetElseIf() []ExecutableIfBlock { } func (in *BranchNodeSpec) GetElseFail() *core.Error { + if in.ElseFail == nil { + return nil + } return in.ElseFail.Error } diff --git a/flytepropeller/pkg/apis/flyteworkflow/v1alpha1/branch_test.go b/flytepropeller/pkg/apis/flyteworkflow/v1alpha1/branch_test.go index c1fffdb061..59451a4e58 100644 --- a/flytepropeller/pkg/apis/flyteworkflow/v1alpha1/branch_test.go +++ b/flytepropeller/pkg/apis/flyteworkflow/v1alpha1/branch_test.go @@ -74,7 +74,7 @@ func TestBranchNodeSpecMethods(t *testing.T) { assert.Equal(t, boolExpr, elifs[0].GetCondition()) assert.Equal(t, &elifNode, elifs[0].GetThenNode()) - assert.Equal(t, errorMessage, branchNodeSpec.GetElseFail()) + assert.Equal(t, errorMessage.Error, branchNodeSpec.GetElseFail()) branchNodeSpec.ElseFail = nil assert.Nil(t, branchNodeSpec.GetElseFail()) diff --git a/flytepropeller/pkg/apis/flyteworkflow/v1alpha1/workflow_test.go b/flytepropeller/pkg/apis/flyteworkflow/v1alpha1/workflow_test.go index c15289e257..139fcb18fd 100644 --- a/flytepropeller/pkg/apis/flyteworkflow/v1alpha1/workflow_test.go +++ b/flytepropeller/pkg/apis/flyteworkflow/v1alpha1/workflow_test.go @@ -228,9 +228,7 @@ func TestWorkflow(t *testing.T) { }, }, DataReferenceConstructor: storage.URLPathConstructor{}, - WorkflowClosureReference: v1alpha1.DataReference( - storage.DataReference("data-reference"), - ), + WorkflowClosureReference: storage.DataReference("data-reference"), } wCopy := w.DeepCopy() diff --git a/flytepropeller/pkg/compiler/transformers/k8s/node.go b/flytepropeller/pkg/compiler/transformers/k8s/node.go index e7bb4750df..06038d1039 100644 --- a/flytepropeller/pkg/compiler/transformers/k8s/node.go +++ b/flytepropeller/pkg/compiler/transformers/k8s/node.go @@ -243,7 +243,7 @@ func buildBranchNodeSpec(branch *core.BranchNode, tasks []*core.CompiledTask, er case *core.IfElseBlock_Error: coreError := branch.IfElse.GetError() res.ElseFail = &v1alpha1.Error{ - coreError, + Error: coreError, } } diff --git a/flytepropeller/pkg/controller/nodes/branch/evaluator_test.go b/flytepropeller/pkg/controller/nodes/branch/evaluator_test.go index dae8a1337b..45bb850358 100644 --- a/flytepropeller/pkg/controller/nodes/branch/evaluator_test.go +++ b/flytepropeller/pkg/controller/nodes/branch/evaluator_test.go @@ -672,8 +672,10 @@ func TestDecideBranch(t *testing.T) { ThenNode: &n2, }, }, - ElseFail: &core.Error{ - Message: userError, + ElseFail: &v1alpha1.Error{ + Error: &core.Error{ + Message: userError, + }, }, } From 23539c2bb69bb1cf796a93e633970a476fc22dc7 Mon Sep 17 00:00:00 2001 From: Eduardo Apolinario Date: Mon, 10 Jun 2024 20:01:27 -0700 Subject: [PATCH 14/19] Update golden files to account for correct json field `failedNodeId` Signed-off-by: Eduardo Apolinario --- .../028_core.control_flow.conditions.multiplier_2_2_wf_crd.json | 2 +- .../030_core.control_flow.conditions.multiplier_3_2_wf_crd.json | 2 +- ...core.control_flow.conditions.nested_conditions_2_wf_crd.json | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/flytepropeller/pkg/compiler/test/testdata/snacks-core/k8s/028_core.control_flow.conditions.multiplier_2_2_wf_crd.json b/flytepropeller/pkg/compiler/test/testdata/snacks-core/k8s/028_core.control_flow.conditions.multiplier_2_2_wf_crd.json index 5598c7a375..b92ad45ea0 100755 --- a/flytepropeller/pkg/compiler/test/testdata/snacks-core/k8s/028_core.control_flow.conditions.multiplier_2_2_wf_crd.json +++ b/flytepropeller/pkg/compiler/test/testdata/snacks-core/k8s/028_core.control_flow.conditions.multiplier_2_2_wf_crd.json @@ -1 +1 @@ -{"kind":"flyteworkflow","apiVersion":"flyte.lyft.com/v1alpha1","metadata":{"name":"name","namespace":"namespace","creationTimestamp":null,"labels":{"domain":"domain","execution-id":"name","project":"hello","shard-key":"6","workflow-name":"core-control-flow-conditions-multiplier-2"}},"spec":{"id":"::core.control_flow.conditions.multiplier_2","nodes":{"end-node":{"id":"end-node","resources":{},"kind":"end","inputBindings":[{"var":"o0","binding":{"promise":{"nodeId":"n0","var":"o0"}}}]},"n0":{"id":"n0","name":"fractions","resources":{},"kind":"branch","branch":{"if":{"condition":{"conjunction":{"leftExpression":{"comparison":{"operator":"GT","leftValue":{"var":".my_input"},"rightValue":{"primitive":{"floatValue":0.1}}}},"rightExpression":{"comparison":{"operator":"LT","leftValue":{"var":".my_input"},"rightValue":{"primitive":{"floatValue":1}}}}}},"then":"n0-n0"},"elseIf":[{"condition":{"conjunction":{"leftExpression":{"comparison":{"operator":"GT","leftValue":{"var":".my_input"},"rightValue":{"primitive":{"floatValue":1}}}},"rightExpression":{"comparison":{"operator":"LTE","leftValue":{"var":".my_input"},"rightValue":{"primitive":{"floatValue":10}}}}}},"then":"n0-n1"}],"elseFail":{"failed_node_id":"fractions","message":"The input must be between 0 and 10"}},"inputBindings":[{"var":".my_input","binding":{"promise":{"nodeId":"start-node","var":"my_input"}}}]},"n0-n0":{"id":"n0-n0","name":"double","resources":{},"kind":"task","task":"resource_type:TASK name:\"core.control_flow.conditions.double\"","inputBindings":[{"var":"n","binding":{"promise":{"nodeId":"start-node","var":"my_input"}}}]},"n0-n1":{"id":"n0-n1","name":"square","resources":{},"kind":"task","task":"resource_type:TASK name:\"core.control_flow.conditions.square\"","inputBindings":[{"var":"n","binding":{"promise":{"nodeId":"start-node","var":"my_input"}}}]},"start-node":{"id":"start-node","resources":{},"kind":"start"}},"connections":{"n0":["end-node"],"start-node":["n0"]},"edges":{"downstream":{"n0":["end-node"],"start-node":["n0"]},"upstream":{"end-node":["n0"],"n0":["start-node"],"n0-n0":["start-node"],"n0-n1":["start-node"]}},"outputs":{"variables":{"o0":{"type":{"simple":"FLOAT"}}}},"outputBindings":[{"var":"o0","binding":{"promise":{"nodeId":"n0","var":"o0"}}}]},"inputs":{"literals":{"my_input":{"scalar":{"primitive":{"floatValue":0}}}}},"executionId":{},"tasks":{"resource_type:TASK name:\"core.control_flow.conditions.double\"":{"id":{"resourceType":"TASK","name":"core.control_flow.conditions.double"},"type":"python-task","metadata":{"runtime":{"type":"FLYTE_SDK","version":"0.32.6","flavor":"python"},"retries":{}},"interface":{"inputs":{"variables":{"n":{"type":{"simple":"FLOAT"}}}},"outputs":{"variables":{"o0":{"type":{"simple":"FLOAT"}}}}},"container":{"image":"ghcr.io/flyteorg/flytecookbook:core-8b8e1a849c9adfca88049a074b10dad278f70077","args":["pyflyte-execute","--inputs","{{.input}}","--output-prefix","{{.outputPrefix}}","--raw-output-data-prefix","{{.rawOutputDataPrefix}}","--checkpoint-path","{{.checkpointOutputPrefix}}","--prev-checkpoint","{{.prevCheckpointPrefix}}","--resolver","flytekit.core.python_auto_container.default_task_resolver","--","task-module","core.control_flow.conditions","task-name","double"],"resources":{},"config":[{"key":"testKey1","value":"testValue1"},{"key":"testKey2","value":"testValue2"},{"key":"testKey3","value":"testValue3"}]}},"resource_type:TASK name:\"core.control_flow.conditions.square\"":{"id":{"resourceType":"TASK","name":"core.control_flow.conditions.square"},"type":"python-task","metadata":{"runtime":{"type":"FLYTE_SDK","version":"0.32.6","flavor":"python"},"retries":{}},"interface":{"inputs":{"variables":{"n":{"type":{"simple":"FLOAT"}}}},"outputs":{"variables":{"o0":{"type":{"simple":"FLOAT"}}}}},"container":{"image":"ghcr.io/flyteorg/flytecookbook:core-8b8e1a849c9adfca88049a074b10dad278f70077","args":["pyflyte-execute","--inputs","{{.input}}","--output-prefix","{{.outputPrefix}}","--raw-output-data-prefix","{{.rawOutputDataPrefix}}","--checkpoint-path","{{.checkpointOutputPrefix}}","--prev-checkpoint","{{.prevCheckpointPrefix}}","--resolver","flytekit.core.python_auto_container.default_task_resolver","--","task-module","core.control_flow.conditions","task-name","square"],"resources":{},"config":[{"key":"testKey1","value":"testValue1"},{"key":"testKey2","value":"testValue2"},{"key":"testKey3","value":"testValue3"}]}}},"node-defaults":{},"securityContext":{},"status":{"phase":0},"rawOutputDataConfig":{},"executionConfig":{"TaskPluginImpls":null,"MaxParallelism":0,"RecoveryExecution":{},"TaskResources":{"Requests":{"CPU":"0","Memory":"0","EphemeralStorage":"0","Storage":"0","GPU":"0"},"Limits":{"CPU":"0","Memory":"0","EphemeralStorage":"0","Storage":"0","GPU":"0"}},"Interruptible":null,"OverwriteCache":false,"EnvironmentVariables":null}} \ No newline at end of file +{"kind":"flyteworkflow","apiVersion":"flyte.lyft.com/v1alpha1","metadata":{"name":"name","namespace":"namespace","creationTimestamp":null,"labels":{"domain":"domain","execution-id":"name","project":"hello","shard-key":"6","workflow-name":"core-control-flow-conditions-multiplier-2"}},"spec":{"id":"::core.control_flow.conditions.multiplier_2","nodes":{"end-node":{"id":"end-node","resources":{},"kind":"end","inputBindings":[{"var":"o0","binding":{"promise":{"nodeId":"n0","var":"o0"}}}]},"n0":{"id":"n0","name":"fractions","resources":{},"kind":"branch","branch":{"if":{"condition":{"conjunction":{"leftExpression":{"comparison":{"operator":"GT","leftValue":{"var":".my_input"},"rightValue":{"primitive":{"floatValue":0.1}}}},"rightExpression":{"comparison":{"operator":"LT","leftValue":{"var":".my_input"},"rightValue":{"primitive":{"floatValue":1}}}}}},"then":"n0-n0"},"elseIf":[{"condition":{"conjunction":{"leftExpression":{"comparison":{"operator":"GT","leftValue":{"var":".my_input"},"rightValue":{"primitive":{"floatValue":1}}}},"rightExpression":{"comparison":{"operator":"LTE","leftValue":{"var":".my_input"},"rightValue":{"primitive":{"floatValue":10}}}}}},"then":"n0-n1"}],"elseFail":{"failedNodeId":"fractions","message":"The input must be between 0 and 10"}},"inputBindings":[{"var":".my_input","binding":{"promise":{"nodeId":"start-node","var":"my_input"}}}]},"n0-n0":{"id":"n0-n0","name":"double","resources":{},"kind":"task","task":"resource_type:TASK name:\"core.control_flow.conditions.double\"","inputBindings":[{"var":"n","binding":{"promise":{"nodeId":"start-node","var":"my_input"}}}]},"n0-n1":{"id":"n0-n1","name":"square","resources":{},"kind":"task","task":"resource_type:TASK name:\"core.control_flow.conditions.square\"","inputBindings":[{"var":"n","binding":{"promise":{"nodeId":"start-node","var":"my_input"}}}]},"start-node":{"id":"start-node","resources":{},"kind":"start"}},"connections":{"n0":["end-node"],"start-node":["n0"]},"edges":{"downstream":{"n0":["end-node"],"start-node":["n0"]},"upstream":{"end-node":["n0"],"n0":["start-node"],"n0-n0":["start-node"],"n0-n1":["start-node"]}},"outputs":{"variables":{"o0":{"type":{"simple":"FLOAT"}}}},"outputBindings":[{"var":"o0","binding":{"promise":{"nodeId":"n0","var":"o0"}}}]},"inputs":{"literals":{"my_input":{"scalar":{"primitive":{"floatValue":0}}}}},"executionId":{},"tasks":{"resource_type:TASK name:\"core.control_flow.conditions.double\"":{"id":{"resourceType":"TASK","name":"core.control_flow.conditions.double"},"type":"python-task","metadata":{"runtime":{"type":"FLYTE_SDK","version":"0.32.6","flavor":"python"},"retries":{}},"interface":{"inputs":{"variables":{"n":{"type":{"simple":"FLOAT"}}}},"outputs":{"variables":{"o0":{"type":{"simple":"FLOAT"}}}}},"container":{"image":"ghcr.io/flyteorg/flytecookbook:core-8b8e1a849c9adfca88049a074b10dad278f70077","args":["pyflyte-execute","--inputs","{{.input}}","--output-prefix","{{.outputPrefix}}","--raw-output-data-prefix","{{.rawOutputDataPrefix}}","--checkpoint-path","{{.checkpointOutputPrefix}}","--prev-checkpoint","{{.prevCheckpointPrefix}}","--resolver","flytekit.core.python_auto_container.default_task_resolver","--","task-module","core.control_flow.conditions","task-name","double"],"resources":{},"config":[{"key":"testKey1","value":"testValue1"},{"key":"testKey2","value":"testValue2"},{"key":"testKey3","value":"testValue3"}]}},"resource_type:TASK name:\"core.control_flow.conditions.square\"":{"id":{"resourceType":"TASK","name":"core.control_flow.conditions.square"},"type":"python-task","metadata":{"runtime":{"type":"FLYTE_SDK","version":"0.32.6","flavor":"python"},"retries":{}},"interface":{"inputs":{"variables":{"n":{"type":{"simple":"FLOAT"}}}},"outputs":{"variables":{"o0":{"type":{"simple":"FLOAT"}}}}},"container":{"image":"ghcr.io/flyteorg/flytecookbook:core-8b8e1a849c9adfca88049a074b10dad278f70077","args":["pyflyte-execute","--inputs","{{.input}}","--output-prefix","{{.outputPrefix}}","--raw-output-data-prefix","{{.rawOutputDataPrefix}}","--checkpoint-path","{{.checkpointOutputPrefix}}","--prev-checkpoint","{{.prevCheckpointPrefix}}","--resolver","flytekit.core.python_auto_container.default_task_resolver","--","task-module","core.control_flow.conditions","task-name","square"],"resources":{},"config":[{"key":"testKey1","value":"testValue1"},{"key":"testKey2","value":"testValue2"},{"key":"testKey3","value":"testValue3"}]}}},"node-defaults":{},"securityContext":{},"status":{"phase":0},"rawOutputDataConfig":{},"executionConfig":{"TaskPluginImpls":null,"MaxParallelism":0,"RecoveryExecution":{},"TaskResources":{"Requests":{"CPU":"0","Memory":"0","EphemeralStorage":"0","Storage":"0","GPU":"0"},"Limits":{"CPU":"0","Memory":"0","EphemeralStorage":"0","Storage":"0","GPU":"0"}},"Interruptible":null,"OverwriteCache":false,"EnvironmentVariables":null}} \ No newline at end of file diff --git a/flytepropeller/pkg/compiler/test/testdata/snacks-core/k8s/030_core.control_flow.conditions.multiplier_3_2_wf_crd.json b/flytepropeller/pkg/compiler/test/testdata/snacks-core/k8s/030_core.control_flow.conditions.multiplier_3_2_wf_crd.json index f7bd87faac..6292a3ad17 100755 --- a/flytepropeller/pkg/compiler/test/testdata/snacks-core/k8s/030_core.control_flow.conditions.multiplier_3_2_wf_crd.json +++ b/flytepropeller/pkg/compiler/test/testdata/snacks-core/k8s/030_core.control_flow.conditions.multiplier_3_2_wf_crd.json @@ -1 +1 @@ -{"kind":"flyteworkflow","apiVersion":"flyte.lyft.com/v1alpha1","metadata":{"name":"name","namespace":"namespace","creationTimestamp":null,"labels":{"domain":"domain","execution-id":"name","project":"hello","shard-key":"6","workflow-name":"core-control-flow-conditions-multiplier-3"}},"spec":{"id":"::core.control_flow.conditions.multiplier_3","nodes":{"end-node":{"id":"end-node","resources":{},"kind":"end","inputBindings":[{"var":"o0","binding":{"promise":{"nodeId":"n1","var":"o0"}}}]},"n0":{"id":"n0","name":"fractions","resources":{},"kind":"branch","branch":{"if":{"condition":{"conjunction":{"leftExpression":{"comparison":{"operator":"GT","leftValue":{"var":".my_input"},"rightValue":{"primitive":{"floatValue":0.1}}}},"rightExpression":{"comparison":{"operator":"LT","leftValue":{"var":".my_input"},"rightValue":{"primitive":{"floatValue":1}}}}}},"then":"n0-n0"},"elseIf":[{"condition":{"conjunction":{"leftExpression":{"comparison":{"operator":"GT","leftValue":{"var":".my_input"},"rightValue":{"primitive":{"floatValue":1}}}},"rightExpression":{"comparison":{"operator":"LT","leftValue":{"var":".my_input"},"rightValue":{"primitive":{"floatValue":10}}}}}},"then":"n0-n1"}],"elseFail":{"failed_node_id":"fractions","message":"The input must be between 0 and 10"}},"inputBindings":[{"var":".my_input","binding":{"promise":{"nodeId":"start-node","var":"my_input"}}}]},"n0-n0":{"id":"n0-n0","name":"double","resources":{},"kind":"task","task":"resource_type:TASK name:\"core.control_flow.conditions.double\"","inputBindings":[{"var":"n","binding":{"promise":{"nodeId":"start-node","var":"my_input"}}}]},"n0-n1":{"id":"n0-n1","name":"square","resources":{},"kind":"task","task":"resource_type:TASK name:\"core.control_flow.conditions.square\"","inputBindings":[{"var":"n","binding":{"promise":{"nodeId":"start-node","var":"my_input"}}}]},"n1":{"id":"n1","name":"double","resources":{},"kind":"task","task":"resource_type:TASK name:\"core.control_flow.conditions.double\"","inputBindings":[{"var":"n","binding":{"promise":{"nodeId":"n0","var":"o0"}}}]},"start-node":{"id":"start-node","resources":{},"kind":"start"}},"connections":{"n0":["n1"],"n1":["end-node"],"start-node":["n0"]},"edges":{"downstream":{"n0":["n1"],"n1":["end-node"],"start-node":["n0"]},"upstream":{"end-node":["n1"],"n0":["start-node"],"n0-n0":["start-node"],"n0-n1":["start-node"],"n1":["n0"]}},"outputs":{"variables":{"o0":{"type":{"simple":"FLOAT"}}}},"outputBindings":[{"var":"o0","binding":{"promise":{"nodeId":"n1","var":"o0"}}}]},"inputs":{"literals":{"my_input":{"scalar":{"primitive":{"floatValue":0}}}}},"executionId":{},"tasks":{"resource_type:TASK name:\"core.control_flow.conditions.double\"":{"id":{"resourceType":"TASK","name":"core.control_flow.conditions.double"},"type":"python-task","metadata":{"runtime":{"type":"FLYTE_SDK","version":"0.32.6","flavor":"python"},"retries":{}},"interface":{"inputs":{"variables":{"n":{"type":{"simple":"FLOAT"}}}},"outputs":{"variables":{"o0":{"type":{"simple":"FLOAT"}}}}},"container":{"image":"ghcr.io/flyteorg/flytecookbook:core-8b8e1a849c9adfca88049a074b10dad278f70077","args":["pyflyte-execute","--inputs","{{.input}}","--output-prefix","{{.outputPrefix}}","--raw-output-data-prefix","{{.rawOutputDataPrefix}}","--checkpoint-path","{{.checkpointOutputPrefix}}","--prev-checkpoint","{{.prevCheckpointPrefix}}","--resolver","flytekit.core.python_auto_container.default_task_resolver","--","task-module","core.control_flow.conditions","task-name","double"],"resources":{},"config":[{"key":"testKey1","value":"testValue1"},{"key":"testKey2","value":"testValue2"},{"key":"testKey3","value":"testValue3"}]}},"resource_type:TASK name:\"core.control_flow.conditions.square\"":{"id":{"resourceType":"TASK","name":"core.control_flow.conditions.square"},"type":"python-task","metadata":{"runtime":{"type":"FLYTE_SDK","version":"0.32.6","flavor":"python"},"retries":{}},"interface":{"inputs":{"variables":{"n":{"type":{"simple":"FLOAT"}}}},"outputs":{"variables":{"o0":{"type":{"simple":"FLOAT"}}}}},"container":{"image":"ghcr.io/flyteorg/flytecookbook:core-8b8e1a849c9adfca88049a074b10dad278f70077","args":["pyflyte-execute","--inputs","{{.input}}","--output-prefix","{{.outputPrefix}}","--raw-output-data-prefix","{{.rawOutputDataPrefix}}","--checkpoint-path","{{.checkpointOutputPrefix}}","--prev-checkpoint","{{.prevCheckpointPrefix}}","--resolver","flytekit.core.python_auto_container.default_task_resolver","--","task-module","core.control_flow.conditions","task-name","square"],"resources":{},"config":[{"key":"testKey1","value":"testValue1"},{"key":"testKey2","value":"testValue2"},{"key":"testKey3","value":"testValue3"}]}}},"node-defaults":{},"securityContext":{},"status":{"phase":0},"rawOutputDataConfig":{},"executionConfig":{"TaskPluginImpls":null,"MaxParallelism":0,"RecoveryExecution":{},"TaskResources":{"Requests":{"CPU":"0","Memory":"0","EphemeralStorage":"0","Storage":"0","GPU":"0"},"Limits":{"CPU":"0","Memory":"0","EphemeralStorage":"0","Storage":"0","GPU":"0"}},"Interruptible":null,"OverwriteCache":false,"EnvironmentVariables":null}} \ No newline at end of file +{"kind":"flyteworkflow","apiVersion":"flyte.lyft.com/v1alpha1","metadata":{"name":"name","namespace":"namespace","creationTimestamp":null,"labels":{"domain":"domain","execution-id":"name","project":"hello","shard-key":"6","workflow-name":"core-control-flow-conditions-multiplier-3"}},"spec":{"id":"::core.control_flow.conditions.multiplier_3","nodes":{"end-node":{"id":"end-node","resources":{},"kind":"end","inputBindings":[{"var":"o0","binding":{"promise":{"nodeId":"n1","var":"o0"}}}]},"n0":{"id":"n0","name":"fractions","resources":{},"kind":"branch","branch":{"if":{"condition":{"conjunction":{"leftExpression":{"comparison":{"operator":"GT","leftValue":{"var":".my_input"},"rightValue":{"primitive":{"floatValue":0.1}}}},"rightExpression":{"comparison":{"operator":"LT","leftValue":{"var":".my_input"},"rightValue":{"primitive":{"floatValue":1}}}}}},"then":"n0-n0"},"elseIf":[{"condition":{"conjunction":{"leftExpression":{"comparison":{"operator":"GT","leftValue":{"var":".my_input"},"rightValue":{"primitive":{"floatValue":1}}}},"rightExpression":{"comparison":{"operator":"LT","leftValue":{"var":".my_input"},"rightValue":{"primitive":{"floatValue":10}}}}}},"then":"n0-n1"}],"elseFail":{"failedNodeId":"fractions","message":"The input must be between 0 and 10"}},"inputBindings":[{"var":".my_input","binding":{"promise":{"nodeId":"start-node","var":"my_input"}}}]},"n0-n0":{"id":"n0-n0","name":"double","resources":{},"kind":"task","task":"resource_type:TASK name:\"core.control_flow.conditions.double\"","inputBindings":[{"var":"n","binding":{"promise":{"nodeId":"start-node","var":"my_input"}}}]},"n0-n1":{"id":"n0-n1","name":"square","resources":{},"kind":"task","task":"resource_type:TASK name:\"core.control_flow.conditions.square\"","inputBindings":[{"var":"n","binding":{"promise":{"nodeId":"start-node","var":"my_input"}}}]},"n1":{"id":"n1","name":"double","resources":{},"kind":"task","task":"resource_type:TASK name:\"core.control_flow.conditions.double\"","inputBindings":[{"var":"n","binding":{"promise":{"nodeId":"n0","var":"o0"}}}]},"start-node":{"id":"start-node","resources":{},"kind":"start"}},"connections":{"n0":["n1"],"n1":["end-node"],"start-node":["n0"]},"edges":{"downstream":{"n0":["n1"],"n1":["end-node"],"start-node":["n0"]},"upstream":{"end-node":["n1"],"n0":["start-node"],"n0-n0":["start-node"],"n0-n1":["start-node"],"n1":["n0"]}},"outputs":{"variables":{"o0":{"type":{"simple":"FLOAT"}}}},"outputBindings":[{"var":"o0","binding":{"promise":{"nodeId":"n1","var":"o0"}}}]},"inputs":{"literals":{"my_input":{"scalar":{"primitive":{"floatValue":0}}}}},"executionId":{},"tasks":{"resource_type:TASK name:\"core.control_flow.conditions.double\"":{"id":{"resourceType":"TASK","name":"core.control_flow.conditions.double"},"type":"python-task","metadata":{"runtime":{"type":"FLYTE_SDK","version":"0.32.6","flavor":"python"},"retries":{}},"interface":{"inputs":{"variables":{"n":{"type":{"simple":"FLOAT"}}}},"outputs":{"variables":{"o0":{"type":{"simple":"FLOAT"}}}}},"container":{"image":"ghcr.io/flyteorg/flytecookbook:core-8b8e1a849c9adfca88049a074b10dad278f70077","args":["pyflyte-execute","--inputs","{{.input}}","--output-prefix","{{.outputPrefix}}","--raw-output-data-prefix","{{.rawOutputDataPrefix}}","--checkpoint-path","{{.checkpointOutputPrefix}}","--prev-checkpoint","{{.prevCheckpointPrefix}}","--resolver","flytekit.core.python_auto_container.default_task_resolver","--","task-module","core.control_flow.conditions","task-name","double"],"resources":{},"config":[{"key":"testKey1","value":"testValue1"},{"key":"testKey2","value":"testValue2"},{"key":"testKey3","value":"testValue3"}]}},"resource_type:TASK name:\"core.control_flow.conditions.square\"":{"id":{"resourceType":"TASK","name":"core.control_flow.conditions.square"},"type":"python-task","metadata":{"runtime":{"type":"FLYTE_SDK","version":"0.32.6","flavor":"python"},"retries":{}},"interface":{"inputs":{"variables":{"n":{"type":{"simple":"FLOAT"}}}},"outputs":{"variables":{"o0":{"type":{"simple":"FLOAT"}}}}},"container":{"image":"ghcr.io/flyteorg/flytecookbook:core-8b8e1a849c9adfca88049a074b10dad278f70077","args":["pyflyte-execute","--inputs","{{.input}}","--output-prefix","{{.outputPrefix}}","--raw-output-data-prefix","{{.rawOutputDataPrefix}}","--checkpoint-path","{{.checkpointOutputPrefix}}","--prev-checkpoint","{{.prevCheckpointPrefix}}","--resolver","flytekit.core.python_auto_container.default_task_resolver","--","task-module","core.control_flow.conditions","task-name","square"],"resources":{},"config":[{"key":"testKey1","value":"testValue1"},{"key":"testKey2","value":"testValue2"},{"key":"testKey3","value":"testValue3"}]}}},"node-defaults":{},"securityContext":{},"status":{"phase":0},"rawOutputDataConfig":{},"executionConfig":{"TaskPluginImpls":null,"MaxParallelism":0,"RecoveryExecution":{},"TaskResources":{"Requests":{"CPU":"0","Memory":"0","EphemeralStorage":"0","Storage":"0","GPU":"0"},"Limits":{"CPU":"0","Memory":"0","EphemeralStorage":"0","Storage":"0","GPU":"0"}},"Interruptible":null,"OverwriteCache":false,"EnvironmentVariables":null}} \ No newline at end of file diff --git a/flytepropeller/pkg/compiler/test/testdata/snacks-core/k8s/039_core.control_flow.conditions.nested_conditions_2_wf_crd.json b/flytepropeller/pkg/compiler/test/testdata/snacks-core/k8s/039_core.control_flow.conditions.nested_conditions_2_wf_crd.json index cad6c84059..7ebecf9329 100755 --- a/flytepropeller/pkg/compiler/test/testdata/snacks-core/k8s/039_core.control_flow.conditions.nested_conditions_2_wf_crd.json +++ b/flytepropeller/pkg/compiler/test/testdata/snacks-core/k8s/039_core.control_flow.conditions.nested_conditions_2_wf_crd.json @@ -1 +1 @@ -{"kind":"flyteworkflow","apiVersion":"flyte.lyft.com/v1alpha1","metadata":{"name":"name","namespace":"namespace","creationTimestamp":null,"labels":{"domain":"domain","execution-id":"name","project":"hello","shard-key":"6","workflow-name":"core-control-flow-conditions-nested-conditions"}},"spec":{"id":"::core.control_flow.conditions.nested_conditions","nodes":{"end-node":{"id":"end-node","resources":{},"kind":"end","inputBindings":[{"var":"o0","binding":{"promise":{"nodeId":"n0","var":"o0"}}}]},"n0":{"id":"n0","name":"fractions","resources":{},"kind":"branch","branch":{"if":{"condition":{"conjunction":{"leftExpression":{"comparison":{"operator":"GT","leftValue":{"var":".my_input"},"rightValue":{"primitive":{"floatValue":0.1}}}},"rightExpression":{"comparison":{"operator":"LT","leftValue":{"var":".my_input"},"rightValue":{"primitive":{"floatValue":1}}}}}},"then":"n0-n0"},"elseIf":[{"condition":{"conjunction":{"leftExpression":{"comparison":{"operator":"GT","leftValue":{"var":".my_input"},"rightValue":{"primitive":{"floatValue":1}}}},"rightExpression":{"comparison":{"operator":"LT","leftValue":{"var":".my_input"},"rightValue":{"primitive":{"floatValue":10}}}}}},"then":"n0-n1"}],"else":"n0-n2"},"inputBindings":[{"var":".my_input","binding":{"promise":{"nodeId":"start-node","var":"my_input"}}}]},"n0-n0":{"id":"n0-n0","name":"inner_fractions","resources":{},"kind":"branch","branch":{"if":{"condition":{"comparison":{"operator":"LT","leftValue":{"var":".my_input"},"rightValue":{"primitive":{"floatValue":0.5}}}},"then":"n0-n0-n0"},"elseIf":[{"condition":{"conjunction":{"leftExpression":{"comparison":{"operator":"GT","leftValue":{"var":".my_input"},"rightValue":{"primitive":{"floatValue":0.5}}}},"rightExpression":{"comparison":{"operator":"LT","leftValue":{"var":".my_input"},"rightValue":{"primitive":{"floatValue":0.7}}}}}},"then":"n0-n0-n1"}],"elseFail":{"failed_node_id":"inner_fractions","message":"Only \u003c0.7 allowed"}},"inputBindings":[{"var":".my_input","binding":{"promise":{"nodeId":"start-node","var":"my_input"}}}]},"n0-n0-n0":{"id":"n0-n0-n0","name":"double","resources":{},"kind":"task","task":"resource_type:TASK name:\"core.control_flow.conditions.double\"","inputBindings":[{"var":"n","binding":{"promise":{"nodeId":"start-node","var":"my_input"}}}]},"n0-n0-n1":{"id":"n0-n0-n1","name":"square","resources":{},"kind":"task","task":"resource_type:TASK name:\"core.control_flow.conditions.square\"","inputBindings":[{"var":"n","binding":{"promise":{"nodeId":"start-node","var":"my_input"}}}]},"n0-n1":{"id":"n0-n1","name":"square","resources":{},"kind":"task","task":"resource_type:TASK name:\"core.control_flow.conditions.square\"","inputBindings":[{"var":"n","binding":{"promise":{"nodeId":"start-node","var":"my_input"}}}]},"n0-n2":{"id":"n0-n2","name":"double","resources":{},"kind":"task","task":"resource_type:TASK name:\"core.control_flow.conditions.double\"","inputBindings":[{"var":"n","binding":{"promise":{"nodeId":"start-node","var":"my_input"}}}]},"start-node":{"id":"start-node","resources":{},"kind":"start"}},"connections":{"n0":["end-node"],"start-node":["n0"]},"edges":{"downstream":{"n0":["end-node"],"start-node":["n0"]},"upstream":{"end-node":["n0"],"n0":["start-node"],"n0-n0":["start-node"],"n0-n0-n0":["start-node"],"n0-n0-n1":["start-node"],"n0-n1":["start-node"],"n0-n2":["start-node"]}},"outputs":{"variables":{"o0":{"type":{"simple":"FLOAT"}}}},"outputBindings":[{"var":"o0","binding":{"promise":{"nodeId":"n0","var":"o0"}}}]},"inputs":{"literals":{"my_input":{"scalar":{"primitive":{"floatValue":0}}}}},"executionId":{},"tasks":{"resource_type:TASK name:\"core.control_flow.conditions.double\"":{"id":{"resourceType":"TASK","name":"core.control_flow.conditions.double"},"type":"python-task","metadata":{"runtime":{"type":"FLYTE_SDK","version":"0.32.6","flavor":"python"},"retries":{}},"interface":{"inputs":{"variables":{"n":{"type":{"simple":"FLOAT"}}}},"outputs":{"variables":{"o0":{"type":{"simple":"FLOAT"}}}}},"container":{"image":"ghcr.io/flyteorg/flytecookbook:core-8b8e1a849c9adfca88049a074b10dad278f70077","args":["pyflyte-execute","--inputs","{{.input}}","--output-prefix","{{.outputPrefix}}","--raw-output-data-prefix","{{.rawOutputDataPrefix}}","--checkpoint-path","{{.checkpointOutputPrefix}}","--prev-checkpoint","{{.prevCheckpointPrefix}}","--resolver","flytekit.core.python_auto_container.default_task_resolver","--","task-module","core.control_flow.conditions","task-name","double"],"resources":{},"config":[{"key":"testKey1","value":"testValue1"},{"key":"testKey2","value":"testValue2"},{"key":"testKey3","value":"testValue3"}]}},"resource_type:TASK name:\"core.control_flow.conditions.square\"":{"id":{"resourceType":"TASK","name":"core.control_flow.conditions.square"},"type":"python-task","metadata":{"runtime":{"type":"FLYTE_SDK","version":"0.32.6","flavor":"python"},"retries":{}},"interface":{"inputs":{"variables":{"n":{"type":{"simple":"FLOAT"}}}},"outputs":{"variables":{"o0":{"type":{"simple":"FLOAT"}}}}},"container":{"image":"ghcr.io/flyteorg/flytecookbook:core-8b8e1a849c9adfca88049a074b10dad278f70077","args":["pyflyte-execute","--inputs","{{.input}}","--output-prefix","{{.outputPrefix}}","--raw-output-data-prefix","{{.rawOutputDataPrefix}}","--checkpoint-path","{{.checkpointOutputPrefix}}","--prev-checkpoint","{{.prevCheckpointPrefix}}","--resolver","flytekit.core.python_auto_container.default_task_resolver","--","task-module","core.control_flow.conditions","task-name","square"],"resources":{},"config":[{"key":"testKey1","value":"testValue1"},{"key":"testKey2","value":"testValue2"},{"key":"testKey3","value":"testValue3"}]}}},"node-defaults":{},"securityContext":{},"status":{"phase":0},"rawOutputDataConfig":{},"executionConfig":{"TaskPluginImpls":null,"MaxParallelism":0,"RecoveryExecution":{},"TaskResources":{"Requests":{"CPU":"0","Memory":"0","EphemeralStorage":"0","Storage":"0","GPU":"0"},"Limits":{"CPU":"0","Memory":"0","EphemeralStorage":"0","Storage":"0","GPU":"0"}},"Interruptible":null,"OverwriteCache":false,"EnvironmentVariables":null}} \ No newline at end of file +{"kind":"flyteworkflow","apiVersion":"flyte.lyft.com/v1alpha1","metadata":{"name":"name","namespace":"namespace","creationTimestamp":null,"labels":{"domain":"domain","execution-id":"name","project":"hello","shard-key":"6","workflow-name":"core-control-flow-conditions-nested-conditions"}},"spec":{"id":"::core.control_flow.conditions.nested_conditions","nodes":{"end-node":{"id":"end-node","resources":{},"kind":"end","inputBindings":[{"var":"o0","binding":{"promise":{"nodeId":"n0","var":"o0"}}}]},"n0":{"id":"n0","name":"fractions","resources":{},"kind":"branch","branch":{"if":{"condition":{"conjunction":{"leftExpression":{"comparison":{"operator":"GT","leftValue":{"var":".my_input"},"rightValue":{"primitive":{"floatValue":0.1}}}},"rightExpression":{"comparison":{"operator":"LT","leftValue":{"var":".my_input"},"rightValue":{"primitive":{"floatValue":1}}}}}},"then":"n0-n0"},"elseIf":[{"condition":{"conjunction":{"leftExpression":{"comparison":{"operator":"GT","leftValue":{"var":".my_input"},"rightValue":{"primitive":{"floatValue":1}}}},"rightExpression":{"comparison":{"operator":"LT","leftValue":{"var":".my_input"},"rightValue":{"primitive":{"floatValue":10}}}}}},"then":"n0-n1"}],"else":"n0-n2"},"inputBindings":[{"var":".my_input","binding":{"promise":{"nodeId":"start-node","var":"my_input"}}}]},"n0-n0":{"id":"n0-n0","name":"inner_fractions","resources":{},"kind":"branch","branch":{"if":{"condition":{"comparison":{"operator":"LT","leftValue":{"var":".my_input"},"rightValue":{"primitive":{"floatValue":0.5}}}},"then":"n0-n0-n0"},"elseIf":[{"condition":{"conjunction":{"leftExpression":{"comparison":{"operator":"GT","leftValue":{"var":".my_input"},"rightValue":{"primitive":{"floatValue":0.5}}}},"rightExpression":{"comparison":{"operator":"LT","leftValue":{"var":".my_input"},"rightValue":{"primitive":{"floatValue":0.7}}}}}},"then":"n0-n0-n1"}],"elseFail":{"failedNodeId":"inner_fractions","message":"Only \u003c0.7 allowed"}},"inputBindings":[{"var":".my_input","binding":{"promise":{"nodeId":"start-node","var":"my_input"}}}]},"n0-n0-n0":{"id":"n0-n0-n0","name":"double","resources":{},"kind":"task","task":"resource_type:TASK name:\"core.control_flow.conditions.double\"","inputBindings":[{"var":"n","binding":{"promise":{"nodeId":"start-node","var":"my_input"}}}]},"n0-n0-n1":{"id":"n0-n0-n1","name":"square","resources":{},"kind":"task","task":"resource_type:TASK name:\"core.control_flow.conditions.square\"","inputBindings":[{"var":"n","binding":{"promise":{"nodeId":"start-node","var":"my_input"}}}]},"n0-n1":{"id":"n0-n1","name":"square","resources":{},"kind":"task","task":"resource_type:TASK name:\"core.control_flow.conditions.square\"","inputBindings":[{"var":"n","binding":{"promise":{"nodeId":"start-node","var":"my_input"}}}]},"n0-n2":{"id":"n0-n2","name":"double","resources":{},"kind":"task","task":"resource_type:TASK name:\"core.control_flow.conditions.double\"","inputBindings":[{"var":"n","binding":{"promise":{"nodeId":"start-node","var":"my_input"}}}]},"start-node":{"id":"start-node","resources":{},"kind":"start"}},"connections":{"n0":["end-node"],"start-node":["n0"]},"edges":{"downstream":{"n0":["end-node"],"start-node":["n0"]},"upstream":{"end-node":["n0"],"n0":["start-node"],"n0-n0":["start-node"],"n0-n0-n0":["start-node"],"n0-n0-n1":["start-node"],"n0-n1":["start-node"],"n0-n2":["start-node"]}},"outputs":{"variables":{"o0":{"type":{"simple":"FLOAT"}}}},"outputBindings":[{"var":"o0","binding":{"promise":{"nodeId":"n0","var":"o0"}}}]},"inputs":{"literals":{"my_input":{"scalar":{"primitive":{"floatValue":0}}}}},"executionId":{},"tasks":{"resource_type:TASK name:\"core.control_flow.conditions.double\"":{"id":{"resourceType":"TASK","name":"core.control_flow.conditions.double"},"type":"python-task","metadata":{"runtime":{"type":"FLYTE_SDK","version":"0.32.6","flavor":"python"},"retries":{}},"interface":{"inputs":{"variables":{"n":{"type":{"simple":"FLOAT"}}}},"outputs":{"variables":{"o0":{"type":{"simple":"FLOAT"}}}}},"container":{"image":"ghcr.io/flyteorg/flytecookbook:core-8b8e1a849c9adfca88049a074b10dad278f70077","args":["pyflyte-execute","--inputs","{{.input}}","--output-prefix","{{.outputPrefix}}","--raw-output-data-prefix","{{.rawOutputDataPrefix}}","--checkpoint-path","{{.checkpointOutputPrefix}}","--prev-checkpoint","{{.prevCheckpointPrefix}}","--resolver","flytekit.core.python_auto_container.default_task_resolver","--","task-module","core.control_flow.conditions","task-name","double"],"resources":{},"config":[{"key":"testKey1","value":"testValue1"},{"key":"testKey2","value":"testValue2"},{"key":"testKey3","value":"testValue3"}]}},"resource_type:TASK name:\"core.control_flow.conditions.square\"":{"id":{"resourceType":"TASK","name":"core.control_flow.conditions.square"},"type":"python-task","metadata":{"runtime":{"type":"FLYTE_SDK","version":"0.32.6","flavor":"python"},"retries":{}},"interface":{"inputs":{"variables":{"n":{"type":{"simple":"FLOAT"}}}},"outputs":{"variables":{"o0":{"type":{"simple":"FLOAT"}}}}},"container":{"image":"ghcr.io/flyteorg/flytecookbook:core-8b8e1a849c9adfca88049a074b10dad278f70077","args":["pyflyte-execute","--inputs","{{.input}}","--output-prefix","{{.outputPrefix}}","--raw-output-data-prefix","{{.rawOutputDataPrefix}}","--checkpoint-path","{{.checkpointOutputPrefix}}","--prev-checkpoint","{{.prevCheckpointPrefix}}","--resolver","flytekit.core.python_auto_container.default_task_resolver","--","task-module","core.control_flow.conditions","task-name","square"],"resources":{},"config":[{"key":"testKey1","value":"testValue1"},{"key":"testKey2","value":"testValue2"},{"key":"testKey3","value":"testValue3"}]}}},"node-defaults":{},"securityContext":{},"status":{"phase":0},"rawOutputDataConfig":{},"executionConfig":{"TaskPluginImpls":null,"MaxParallelism":0,"RecoveryExecution":{},"TaskResources":{"Requests":{"CPU":"0","Memory":"0","EphemeralStorage":"0","Storage":"0","GPU":"0"},"Limits":{"CPU":"0","Memory":"0","EphemeralStorage":"0","Storage":"0","GPU":"0"}},"Interruptible":null,"OverwriteCache":false,"EnvironmentVariables":null}} \ No newline at end of file From 54b63fa06551682e654c40fc0be7e11819a698f2 Mon Sep 17 00:00:00 2001 From: Eduardo Apolinario Date: Mon, 10 Jun 2024 20:02:53 -0700 Subject: [PATCH 15/19] Remove duplicate definition of SecurityContext Signed-off-by: Eduardo Apolinario --- .../apis/flyteworkflow/v1alpha1/workflow.go | 25 ------------------- 1 file changed, 25 deletions(-) diff --git a/flytepropeller/pkg/apis/flyteworkflow/v1alpha1/workflow.go b/flytepropeller/pkg/apis/flyteworkflow/v1alpha1/workflow.go index 797fa824cf..cab4eeae37 100644 --- a/flytepropeller/pkg/apis/flyteworkflow/v1alpha1/workflow.go +++ b/flytepropeller/pkg/apis/flyteworkflow/v1alpha1/workflow.go @@ -194,31 +194,6 @@ func (in *FlyteWorkflow) GetRawOutputDataConfig() RawOutputDataConfig { return in.RawOutputDataConfig } -// type SecurityContext struct { -// *core.SecurityContext -// } - -// func (in *SecurityContext) UnmarshalJSON(b []byte) error { -// in.SecurityContext = &core.SecurityContext{} -// return jsonpb.Unmarshal(bytes.NewReader(b), in.SecurityContext) -// } - -// func (in *SecurityContext) MarshalJSON() ([]byte, error) { -// if in == nil || in.SecurityContext == nil { -// return nilJSON, nil -// } - -// var buf bytes.Buffer -// if err := marshaler.Marshal(&buf, in.SecurityContext); err != nil { -// return nil, err -// } -// return buf.Bytes(), nil -// } - -// func (in *SecurityContext) DeepCopyInto(out *SecurityContext) { -// out.SecurityContext = proto.Clone(in.SecurityContext).(*core.SecurityContext) -// } - type Inputs struct { *core.LiteralMap } From b6741a278392f67501978de79dd69bc1a38e55e1 Mon Sep 17 00:00:00 2001 From: Eduardo Apolinario Date: Mon, 10 Jun 2024 23:03:28 -0700 Subject: [PATCH 16/19] Use ExecutionError in WorkflowNodeStatus, ArrayNodeStatus, and DynamicNodeStatus Signed-off-by: Eduardo Apolinario --- .../flyteworkflow/v1alpha1/node_status.go | 137 ++---------------- .../v1alpha1/node_status_test.go | 2 +- .../v1alpha1/zz_generated.deepcopy.go | 113 +++++++++++++++ .../pkg/controller/nodes/array/handler.go | 4 +- 4 files changed, 129 insertions(+), 127 deletions(-) diff --git a/flytepropeller/pkg/apis/flyteworkflow/v1alpha1/node_status.go b/flytepropeller/pkg/apis/flyteworkflow/v1alpha1/node_status.go index 85ef8e3e2d..e9292cc5f1 100644 --- a/flytepropeller/pkg/apis/flyteworkflow/v1alpha1/node_status.go +++ b/flytepropeller/pkg/apis/flyteworkflow/v1alpha1/node_status.go @@ -9,7 +9,6 @@ import ( "strconv" "time" - "google.golang.org/protobuf/proto" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/core" @@ -112,10 +111,10 @@ func (in *DynamicNodeStatus) GetDynamicNodeReason() string { } func (in *DynamicNodeStatus) GetExecutionError() *core.ExecutionError { - if in.Error == nil { - return nil + if in.Error != nil { + return in.Error.ExecutionError } - return in.Error.ExecutionError + return nil } func (in *DynamicNodeStatus) GetIsFailurePermanent() bool { @@ -138,9 +137,7 @@ func (in *DynamicNodeStatus) SetDynamicNodePhase(phase DynamicNodePhase) { func (in *DynamicNodeStatus) SetExecutionError(err *core.ExecutionError) { if err != nil { - in.Error = &ExecutionError{ExecutionError: err} - } else { - in.Error = nil + in.Error = &ExecutionError{err} } } @@ -171,27 +168,19 @@ const ( type WorkflowNodeStatus struct { MutableStruct - Phase WorkflowNodePhase `json:"phase,omitempty"` - ExecutionError *core.ExecutionError `json:"executionError,omitempty"` -} - -func (in *WorkflowNodeStatus) DeepCopyInto(out *WorkflowNodeStatus) { - *out = *in - out.MutableStruct = in.MutableStruct - if in.ExecutionError != nil { - out.ExecutionError = proto.Clone(in.ExecutionError).(*core.ExecutionError) - } + Phase WorkflowNodePhase `json:"phase,omitempty"` + ExecutionError *ExecutionError `json:"executionError,omitempty"` } func (in *WorkflowNodeStatus) SetExecutionError(executionError *core.ExecutionError) { - if in.ExecutionError != executionError { + if in.ExecutionError.ExecutionError != executionError { in.SetDirty() - in.ExecutionError = executionError + in.ExecutionError.ExecutionError = executionError } } func (in *WorkflowNodeStatus) GetExecutionError() *core.ExecutionError { - return in.ExecutionError + return in.ExecutionError.ExecutionError } func (in *WorkflowNodeStatus) GetWorkflowNodePhase() WorkflowNodePhase { @@ -240,7 +229,7 @@ const ( type ArrayNodeStatus struct { MutableStruct Phase ArrayNodePhase `json:"phase,omitempty"` - ExecutionError *core.ExecutionError `json:"executionError,omitempty"` + ExecutionError *ExecutionError `json:"executionError,omitempty"` SubNodePhases bitarray.CompactArray `json:"subphase,omitempty"` SubNodeTaskPhases bitarray.CompactArray `json:"subtphase,omitempty"` SubNodeRetryAttempts bitarray.CompactArray `json:"subattempts,omitempty"` @@ -248,20 +237,6 @@ type ArrayNodeStatus struct { TaskPhaseVersion uint32 `json:"taskPhaseVersion,omitempty"` } -// ArrayNodeStatus contains at least one proto message directly, which means that we need to -// implement DeepCopyInto since the generated proto messages do not implement that function. -func (in *ArrayNodeStatus) DeepCopyInto(out *ArrayNodeStatus) { - *out = *in - out.MutableStruct = in.MutableStruct - if in.ExecutionError != nil { - out.ExecutionError = proto.Clone(in.ExecutionError).(*core.ExecutionError) - } - in.SubNodePhases.DeepCopyInto(&out.SubNodePhases) - in.SubNodeTaskPhases.DeepCopyInto(&out.SubNodeTaskPhases) - in.SubNodeRetryAttempts.DeepCopyInto(&out.SubNodeRetryAttempts) - in.SubNodeSystemFailures.DeepCopyInto(&out.SubNodeSystemFailures) -} - func (in *ArrayNodeStatus) GetArrayNodePhase() ArrayNodePhase { return in.Phase } @@ -274,13 +249,13 @@ func (in *ArrayNodeStatus) SetArrayNodePhase(phase ArrayNodePhase) { } func (in *ArrayNodeStatus) GetExecutionError() *core.ExecutionError { - return in.ExecutionError + return in.ExecutionError.ExecutionError } func (in *ArrayNodeStatus) SetExecutionError(executionError *core.ExecutionError) { - if in.ExecutionError != executionError { + if in.ExecutionError.ExecutionError != executionError { in.SetDirty() - in.ExecutionError = executionError + in.ExecutionError.ExecutionError = executionError } } @@ -375,92 +350,6 @@ type NodeStatus struct { DataReferenceConstructor storage.ReferenceConstructor `json:"-"` } -// TODO: add comment -func (in *NodeStatus) DeepCopyInto(out *NodeStatus) { - *out = *in - out.MutableStruct = in.MutableStruct - if in.QueuedAt != nil { - in, out := &in.QueuedAt, &out.QueuedAt - *out = (*in).DeepCopy() - } - if in.StartedAt != nil { - in, out := &in.StartedAt, &out.StartedAt - *out = (*in).DeepCopy() - } - if in.StoppedAt != nil { - in, out := &in.StoppedAt, &out.StoppedAt - *out = (*in).DeepCopy() - } - if in.LastUpdatedAt != nil { - in, out := &in.LastUpdatedAt, &out.LastUpdatedAt - *out = (*in).DeepCopy() - } - if in.LastAttemptStartedAt != nil { - in, out := &in.LastAttemptStartedAt, &out.LastAttemptStartedAt - *out = (*in).DeepCopy() - } - if in.ParentNode != nil { - in, out := &in.ParentNode, &out.ParentNode - *out = new(string) - **out = **in - } - if in.ParentTask != nil { - in, out := &in.ParentTask, &out.ParentTask - *out = (*in).DeepCopy() - } - if in.BranchStatus != nil { - in, out := &in.BranchStatus, &out.BranchStatus - *out = new(BranchNodeStatus) - (*in).DeepCopyInto(*out) - } - if in.SubNodeStatus != nil { - in, out := &in.SubNodeStatus, &out.SubNodeStatus - *out = make(map[string]*NodeStatus, len(*in)) - for key, v := range *in { - val := v - var outVal *NodeStatus - if val == nil { - (*out)[key] = nil - } else { - in, out := &val, &outVal - *out = new(NodeStatus) - (*in).DeepCopyInto(*out) - } - (*out)[key] = outVal - } - } - if in.WorkflowNodeStatus != nil { - in, out := &in.WorkflowNodeStatus, &out.WorkflowNodeStatus - *out = new(WorkflowNodeStatus) - (*in).DeepCopyInto(*out) - } - if in.TaskNodeStatus != nil { - in, out := &in.TaskNodeStatus, &out.TaskNodeStatus - *out = (*in).DeepCopy() - } - if in.DynamicNodeStatus != nil { - in, out := &in.DynamicNodeStatus, &out.DynamicNodeStatus - *out = new(DynamicNodeStatus) - (*in).DeepCopyInto(*out) - } - if in.GateNodeStatus != nil { - in, out := &in.GateNodeStatus, &out.GateNodeStatus - *out = new(GateNodeStatus) - **out = **in - } - if in.ArrayNodeStatus != nil { - in, out := &in.ArrayNodeStatus, &out.ArrayNodeStatus - *out = (*in).DeepCopy() - } - if in.Error != nil { - in, out := &in.Error, &out.Error - *out = (*in).DeepCopy() - } - if in.DataReferenceConstructor != nil { - out.DataReferenceConstructor = in.DataReferenceConstructor - } -} - func (in *NodeStatus) IsDirty() bool { isDirty := in.MutableStruct.IsDirty() || (in.TaskNodeStatus != nil && in.TaskNodeStatus.IsDirty()) || diff --git a/flytepropeller/pkg/apis/flyteworkflow/v1alpha1/node_status_test.go b/flytepropeller/pkg/apis/flyteworkflow/v1alpha1/node_status_test.go index 0278d62f55..e05c1592f4 100644 --- a/flytepropeller/pkg/apis/flyteworkflow/v1alpha1/node_status_test.go +++ b/flytepropeller/pkg/apis/flyteworkflow/v1alpha1/node_status_test.go @@ -187,7 +187,7 @@ func TestDynamicNodeStatus_SetExecutionError(t *testing.T) { } in.SetExecutionError(tt.NewError) if tt.NewError == nil { - assert.Nil(t, in.Error) + assert.Nil(t, in.Error.ExecutionError) } else { assert.NotNil(t, in.Error) assert.Equal(t, tt.NewError, in.Error.ExecutionError) diff --git a/flytepropeller/pkg/apis/flyteworkflow/v1alpha1/zz_generated.deepcopy.go b/flytepropeller/pkg/apis/flyteworkflow/v1alpha1/zz_generated.deepcopy.go index cd08078996..3d1c1d472f 100644 --- a/flytepropeller/pkg/apis/flyteworkflow/v1alpha1/zz_generated.deepcopy.go +++ b/flytepropeller/pkg/apis/flyteworkflow/v1alpha1/zz_generated.deepcopy.go @@ -67,6 +67,21 @@ func (in *ArrayNodeSpec) DeepCopy() *ArrayNodeSpec { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ArrayNodeStatus) DeepCopyInto(out *ArrayNodeStatus) { + *out = *in + out.MutableStruct = in.MutableStruct + if in.ExecutionError != nil { + in, out := &in.ExecutionError, &out.ExecutionError + *out = (*in).DeepCopy() + } + in.SubNodePhases.DeepCopyInto(&out.SubNodePhases) + in.SubNodeTaskPhases.DeepCopyInto(&out.SubNodeTaskPhases) + in.SubNodeRetryAttempts.DeepCopyInto(&out.SubNodeRetryAttempts) + in.SubNodeSystemFailures.DeepCopyInto(&out.SubNodeSystemFailures) + return +} + // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ArrayNodeStatus. func (in *ArrayNodeStatus) DeepCopy() *ArrayNodeStatus { if in == nil { @@ -627,6 +642,93 @@ func (in *NodeSpec) DeepCopy() *NodeSpec { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *NodeStatus) DeepCopyInto(out *NodeStatus) { + *out = *in + out.MutableStruct = in.MutableStruct + if in.QueuedAt != nil { + in, out := &in.QueuedAt, &out.QueuedAt + *out = (*in).DeepCopy() + } + if in.StartedAt != nil { + in, out := &in.StartedAt, &out.StartedAt + *out = (*in).DeepCopy() + } + if in.StoppedAt != nil { + in, out := &in.StoppedAt, &out.StoppedAt + *out = (*in).DeepCopy() + } + if in.LastUpdatedAt != nil { + in, out := &in.LastUpdatedAt, &out.LastUpdatedAt + *out = (*in).DeepCopy() + } + if in.LastAttemptStartedAt != nil { + in, out := &in.LastAttemptStartedAt, &out.LastAttemptStartedAt + *out = (*in).DeepCopy() + } + if in.ParentNode != nil { + in, out := &in.ParentNode, &out.ParentNode + *out = new(string) + **out = **in + } + if in.ParentTask != nil { + in, out := &in.ParentTask, &out.ParentTask + *out = (*in).DeepCopy() + } + if in.BranchStatus != nil { + in, out := &in.BranchStatus, &out.BranchStatus + *out = new(BranchNodeStatus) + (*in).DeepCopyInto(*out) + } + if in.SubNodeStatus != nil { + in, out := &in.SubNodeStatus, &out.SubNodeStatus + *out = make(map[string]*NodeStatus, len(*in)) + for key, val := range *in { + var outVal *NodeStatus + if val == nil { + (*out)[key] = nil + } else { + in, out := &val, &outVal + *out = new(NodeStatus) + (*in).DeepCopyInto(*out) + } + (*out)[key] = outVal + } + } + if in.WorkflowNodeStatus != nil { + in, out := &in.WorkflowNodeStatus, &out.WorkflowNodeStatus + *out = new(WorkflowNodeStatus) + (*in).DeepCopyInto(*out) + } + if in.TaskNodeStatus != nil { + in, out := &in.TaskNodeStatus, &out.TaskNodeStatus + *out = (*in).DeepCopy() + } + if in.DynamicNodeStatus != nil { + in, out := &in.DynamicNodeStatus, &out.DynamicNodeStatus + *out = new(DynamicNodeStatus) + (*in).DeepCopyInto(*out) + } + if in.GateNodeStatus != nil { + in, out := &in.GateNodeStatus, &out.GateNodeStatus + *out = new(GateNodeStatus) + **out = **in + } + if in.ArrayNodeStatus != nil { + in, out := &in.ArrayNodeStatus, &out.ArrayNodeStatus + *out = new(ArrayNodeStatus) + (*in).DeepCopyInto(*out) + } + if in.Error != nil { + in, out := &in.Error, &out.Error + *out = (*in).DeepCopy() + } + if in.DataReferenceConstructor != nil { + out.DataReferenceConstructor = in.DataReferenceConstructor.DeepCopyReferenceConstructor() + } + return +} + // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodeStatus. func (in *NodeStatus) DeepCopy() *NodeStatus { if in == nil { @@ -839,6 +941,17 @@ func (in *WorkflowNodeSpec) DeepCopy() *WorkflowNodeSpec { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *WorkflowNodeStatus) DeepCopyInto(out *WorkflowNodeStatus) { + *out = *in + out.MutableStruct = in.MutableStruct + if in.ExecutionError != nil { + in, out := &in.ExecutionError, &out.ExecutionError + *out = (*in).DeepCopy() + } + return +} + // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WorkflowNodeStatus. func (in *WorkflowNodeStatus) DeepCopy() *WorkflowNodeStatus { if in == nil { diff --git a/flytepropeller/pkg/controller/nodes/array/handler.go b/flytepropeller/pkg/controller/nodes/array/handler.go index 0f9e95f19b..7515156be4 100644 --- a/flytepropeller/pkg/controller/nodes/array/handler.go +++ b/flytepropeller/pkg/controller/nodes/array/handler.go @@ -322,8 +322,8 @@ func (a *arrayNodeHandler) Handle(ctx context.Context, nCtx interfaces.NodeExecu subNodeStatus := nodeExecutionRequest.subNodeStatus // capture subNode error if exists - if nodeExecutionRequest.subNodeStatus.Error != nil { - subNodeFailureCollector.Collect(index, subNodeStatus.Error.Message) + if nodeExecutionRequest.subNodeStatus.Error != nil && nodeExecutionRequest.subNodeStatus.Error.ExecutionError != nil { + subNodeFailureCollector.Collect(index, subNodeStatus.Error.ExecutionError.Message) } // process events by copying from internal event recorder From 10f9fb3d30591fcdf2510971f0271d1d5a5c5d1d Mon Sep 17 00:00:00 2001 From: Eduardo Apolinario Date: Mon, 10 Jun 2024 23:14:29 -0700 Subject: [PATCH 17/19] Remove copy of WorfklowStatus DeepCopyInto Signed-off-by: Eduardo Apolinario --- .../flyteworkflow/v1alpha1/workflow_status.go | 43 ------------------ .../v1alpha1/zz_generated.deepcopy.go | 45 +++++++++++++++++++ 2 files changed, 45 insertions(+), 43 deletions(-) diff --git a/flytepropeller/pkg/apis/flyteworkflow/v1alpha1/workflow_status.go b/flytepropeller/pkg/apis/flyteworkflow/v1alpha1/workflow_status.go index 3d9bf390d1..db6175cadf 100644 --- a/flytepropeller/pkg/apis/flyteworkflow/v1alpha1/workflow_status.go +++ b/flytepropeller/pkg/apis/flyteworkflow/v1alpha1/workflow_status.go @@ -45,49 +45,6 @@ type WorkflowStatus struct { DataReferenceConstructor storage.ReferenceConstructor `json:"-"` } -func (in *WorkflowStatus) DeepCopyInto(out *WorkflowStatus) { - *out = *in - if in.StartedAt != nil { - in, out := &in.StartedAt, &out.StartedAt - *out = (*in).DeepCopy() - } - if in.StoppedAt != nil { - in, out := &in.StoppedAt, &out.StoppedAt - *out = (*in).DeepCopy() - } - if in.LastUpdatedAt != nil { - in, out := &in.LastUpdatedAt, &out.LastUpdatedAt - *out = (*in).DeepCopy() - } - if in.NodeStatus != nil { - in, out := &in.NodeStatus, &out.NodeStatus - *out = make(map[string]*NodeStatus, len(*in)) - for key, v := range *in { - val := v - var outVal *NodeStatus - if val == nil { - (*out)[key] = nil - } else { - in, out := &val, &outVal - *out = (*in).DeepCopy() - } - (*out)[key] = outVal - } - } - if in.Error != nil { - in, out := &in.Error, &out.Error - *out = (*in).DeepCopy() - } - if in.DefinitionVersion != nil { - in, out := &in.DefinitionVersion, &out.DefinitionVersion - *out = new(WorkflowDefinitionVersion) - **out = **in - } - if in.DataReferenceConstructor != nil { - out.DataReferenceConstructor = in.DataReferenceConstructor - } -} - func IsWorkflowPhaseTerminal(p WorkflowPhase) bool { return p == WorkflowPhaseFailed || p == WorkflowPhaseSuccess || p == WorkflowPhaseAborted } diff --git a/flytepropeller/pkg/apis/flyteworkflow/v1alpha1/zz_generated.deepcopy.go b/flytepropeller/pkg/apis/flyteworkflow/v1alpha1/zz_generated.deepcopy.go index 3d1c1d472f..a754ede868 100644 --- a/flytepropeller/pkg/apis/flyteworkflow/v1alpha1/zz_generated.deepcopy.go +++ b/flytepropeller/pkg/apis/flyteworkflow/v1alpha1/zz_generated.deepcopy.go @@ -1014,6 +1014,51 @@ func (in *WorkflowSpec) DeepCopy() *WorkflowSpec { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *WorkflowStatus) DeepCopyInto(out *WorkflowStatus) { + *out = *in + if in.StartedAt != nil { + in, out := &in.StartedAt, &out.StartedAt + *out = (*in).DeepCopy() + } + if in.StoppedAt != nil { + in, out := &in.StoppedAt, &out.StoppedAt + *out = (*in).DeepCopy() + } + if in.LastUpdatedAt != nil { + in, out := &in.LastUpdatedAt, &out.LastUpdatedAt + *out = (*in).DeepCopy() + } + if in.NodeStatus != nil { + in, out := &in.NodeStatus, &out.NodeStatus + *out = make(map[string]*NodeStatus, len(*in)) + for key, val := range *in { + var outVal *NodeStatus + if val == nil { + (*out)[key] = nil + } else { + in, out := &val, &outVal + *out = new(NodeStatus) + (*in).DeepCopyInto(*out) + } + (*out)[key] = outVal + } + } + if in.Error != nil { + in, out := &in.Error, &out.Error + *out = (*in).DeepCopy() + } + if in.DefinitionVersion != nil { + in, out := &in.DefinitionVersion, &out.DefinitionVersion + *out = new(WorkflowDefinitionVersion) + **out = **in + } + if in.DataReferenceConstructor != nil { + out.DataReferenceConstructor = in.DataReferenceConstructor.DeepCopyReferenceConstructor() + } + return +} + // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WorkflowStatus. func (in *WorkflowStatus) DeepCopy() *WorkflowStatus { if in == nil { From c000c33823f16c33ea55fdba12ff964df7ec9da7 Mon Sep 17 00:00:00 2001 From: Eduardo Apolinario Date: Mon, 10 Jun 2024 23:31:44 -0700 Subject: [PATCH 18/19] Remove commented test Signed-off-by: Eduardo Apolinario --- .../flyteworkflow/v1alpha1/branch_test.go | 2 +- .../flyteworkflow/v1alpha1/workflow_test.go | 22 ------------------- 2 files changed, 1 insertion(+), 23 deletions(-) diff --git a/flytepropeller/pkg/apis/flyteworkflow/v1alpha1/branch_test.go b/flytepropeller/pkg/apis/flyteworkflow/v1alpha1/branch_test.go index 59451a4e58..7e030b07bc 100644 --- a/flytepropeller/pkg/apis/flyteworkflow/v1alpha1/branch_test.go +++ b/flytepropeller/pkg/apis/flyteworkflow/v1alpha1/branch_test.go @@ -74,7 +74,7 @@ func TestBranchNodeSpecMethods(t *testing.T) { assert.Equal(t, boolExpr, elifs[0].GetCondition()) assert.Equal(t, &elifNode, elifs[0].GetThenNode()) - assert.Equal(t, errorMessage.Error, branchNodeSpec.GetElseFail()) + assert.True(t, proto.Equal(errorMessage.Error, branchNodeSpec.GetElseFail())) branchNodeSpec.ElseFail = nil assert.Nil(t, branchNodeSpec.GetElseFail()) diff --git a/flytepropeller/pkg/apis/flyteworkflow/v1alpha1/workflow_test.go b/flytepropeller/pkg/apis/flyteworkflow/v1alpha1/workflow_test.go index 139fcb18fd..a18b4ef020 100644 --- a/flytepropeller/pkg/apis/flyteworkflow/v1alpha1/workflow_test.go +++ b/flytepropeller/pkg/apis/flyteworkflow/v1alpha1/workflow_test.go @@ -275,28 +275,6 @@ func TestWorkflowIsInterruptible(t *testing.T) { assert.True(t, w.IsInterruptible()) } -// w := &v1alpha1.FlyteWorkflow{ -// Inputs: v1alpha1.Inputs{ -// &core.LiteralMap{ -// Literals: map[string]*core.Literal{ -// "p1": { -// Value: &core.Literal_Scalar{ -// Scalar: &core.Scalar{ -// Value: &core.Scalar_Primitive{ -// Primitive: &core.Primitive{ -// Value: &core.Primitive_Integer{ -// Integer: 1, -// }, -// }, -// }, -// }, -// }, -// }, -// }, -// }, -// }, -// } - func TestWrappedInputsDeepCopy(t *testing.T) { // 1. Setup proto litMap := core.LiteralMap{ From 82724579b51cb0b070e2409211f6828ddfdb4dfd Mon Sep 17 00:00:00 2001 From: Eduardo Apolinario Date: Tue, 11 Jun 2024 11:04:02 -0700 Subject: [PATCH 19/19] Handle null in ArrayNodeStatus, DynamicNodeStatus, and WorkflowNodeStatus implementation of SetExecutionError Signed-off-by: Eduardo Apolinario --- .../pkg/apis/flyteworkflow/v1alpha1/node_status.go | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/flytepropeller/pkg/apis/flyteworkflow/v1alpha1/node_status.go b/flytepropeller/pkg/apis/flyteworkflow/v1alpha1/node_status.go index e9292cc5f1..c005d3ea5a 100644 --- a/flytepropeller/pkg/apis/flyteworkflow/v1alpha1/node_status.go +++ b/flytepropeller/pkg/apis/flyteworkflow/v1alpha1/node_status.go @@ -173,14 +173,17 @@ type WorkflowNodeStatus struct { } func (in *WorkflowNodeStatus) SetExecutionError(executionError *core.ExecutionError) { - if in.ExecutionError.ExecutionError != executionError { + if in.ExecutionError != nil && in.ExecutionError.ExecutionError != executionError { in.SetDirty() in.ExecutionError.ExecutionError = executionError } } func (in *WorkflowNodeStatus) GetExecutionError() *core.ExecutionError { - return in.ExecutionError.ExecutionError + if in.ExecutionError != nil { + return in.ExecutionError.ExecutionError + } + return nil } func (in *WorkflowNodeStatus) GetWorkflowNodePhase() WorkflowNodePhase { @@ -249,11 +252,14 @@ func (in *ArrayNodeStatus) SetArrayNodePhase(phase ArrayNodePhase) { } func (in *ArrayNodeStatus) GetExecutionError() *core.ExecutionError { - return in.ExecutionError.ExecutionError + if in.ExecutionError != nil { + return in.ExecutionError.ExecutionError + } + return nil } func (in *ArrayNodeStatus) SetExecutionError(executionError *core.ExecutionError) { - if in.ExecutionError.ExecutionError != executionError { + if in.ExecutionError != nil && in.ExecutionError.ExecutionError != executionError { in.SetDirty() in.ExecutionError.ExecutionError = executionError }