From 583adbfa1a8f6d7c286144a04cb247ca55031a05 Mon Sep 17 00:00:00 2001 From: Chang-Hong Hsu Date: Fri, 6 Sep 2019 15:28:57 -0700 Subject: [PATCH 1/8] rm fmt.println when crd-validation --- Gopkg.lock | 298 +++-- Gopkg.toml | 14 + Makefile | 1 + cmd/kubectl-flyte/cmd/crd/flyteworkflow.go | 43 + cmd/kubectl-flyte/cmd/crd_validation.go | 96 ++ cmd/kubectl-flyte/cmd/root.go | 1 + pkg/apis/flyteworkflow/v1alpha1/branch.go | 1 + pkg/apis/flyteworkflow/v1alpha1/doc.go | 1 + pkg/apis/flyteworkflow/v1alpha1/nodes.go | 4 + .../v1alpha1/openapi_generated.go | 1162 +++++++++++++++++ pkg/apis/flyteworkflow/v1alpha1/workflow.go | 4 + 11 files changed, 1521 insertions(+), 104 deletions(-) create mode 100644 cmd/kubectl-flyte/cmd/crd/flyteworkflow.go create mode 100644 cmd/kubectl-flyte/cmd/crd_validation.go create mode 100644 pkg/apis/flyteworkflow/v1alpha1/openapi_generated.go diff --git a/Gopkg.lock b/Gopkg.lock index 08a0aa8c7..893331b62 100644 --- a/Gopkg.lock +++ b/Gopkg.lock @@ -2,20 +2,12 @@ [[projects]] - digest = "1:80e5d0810f1448259385b08f381852a83f87b6c958d8500e621db821e15c3771" + digest = "1:62010c37b093a63520b29cefd17edb3aa43735b265d2f2ede22e85fa86bf4cf0" name = "cloud.google.com/go" packages = ["compute/metadata"] pruneopts = "" - revision = "cdaaf98f9226c39dc162b8e55083b2fbc67b4674" - version = "v0.43.0" - -[[projects]] - digest = "1:6158256042564abf0da300ea7cb016f79ddaf24fdda2cc06c9712b0c2e06dd2a" - name = "contrib.go.opencensus.io/exporter/ocagent" - packages = ["."] - pruneopts = "" - revision = "dcb33c7f3b7cfe67e8a2cea10207ede1b7c40764" - version = "v0.4.12" + revision = "d1af076dc3f6a314e9dd6610fe83b0f7afaff6d6" + version = "v0.45.1" [[projects]] digest = "1:9a11be778d5fcb8e4873e64a097dfd2862d8665d9e2d969b90810d5272e51acb" @@ -26,7 +18,7 @@ version = "v10.2.1-beta" [[projects]] - digest = "1:5cb9540799639936e705a6ac54cfb6744b598519485fb357acb6e3285f43fbfb" + digest = "1:efcafb778b0300e3a27d686c0e34c9d61ee03a6fadf942fb2458d3ec014e2d2a" name = "github.com/Azure/go-autorest" packages = [ "autorest", @@ -37,8 +29,8 @@ "tracing", ] pruneopts = "" - revision = "7166fb346dbf8978ad28211a1937b20fdabc08c8" - version = "v12.4.2" + revision = "5e7a399d8bbf4953ab0c8e3167d7fd535fd74ce1" + version = "v13.0.0" [[projects]] digest = "1:558b53577dc0c9fde49b08405d706b202bcac3064320e9be53a75fc866280ee3" @@ -60,6 +52,22 @@ source = "https://github.com/lyft/spark-on-k8s-operator" version = "v0.1.3" +[[projects]] + digest = "1:c0952fb3cf9506cff577b4edf4458889570dcbd2902a7b90a1fd96bfbb97ccd8" + name = "github.com/PuerkitoBio/purell" + packages = ["."] + pruneopts = "" + revision = "44968752391892e1b0d0b821ee79e9a85fa13049" + version = "v1.1.1" + +[[projects]] + branch = "master" + digest = "1:331a419049c2be691e5ba1d24342fc77c7e767a80c666a18fd8a9f7b82419c1c" + name = "github.com/PuerkitoBio/urlesc" + packages = ["."] + pruneopts = "" + revision = "de5bf2ad457846296e2031421a34e2568e304e35" + [[projects]] digest = "1:60942d250d0e06d3722ddc8e22bc52f8cef7961ba6d8d3e95327a32b6b024a7b" name = "github.com/appscode/jsonpatch" @@ -69,7 +77,7 @@ version = "1.0.0" [[projects]] - digest = "1:cfe39a015adcf9cc2bce0e8bd38ecf041cb516b8ab7a2ecb11b1c84a4b8acabf" + digest = "1:39a7980573c7724a834ebeac5173a8d68b2e0cc62868e742a0b3ec02690208d9" name = "github.com/aws/aws-sdk-go" packages = [ "aws", @@ -93,6 +101,7 @@ "internal/ini", "internal/s3err", "internal/sdkio", + "internal/sdkmath", "internal/sdkrand", "internal/sdkuri", "internal/shareddefaults", @@ -112,8 +121,8 @@ "service/sts/stsiface", ] pruneopts = "" - revision = "14379de571db1ac1b08f2f723a1acc1810c4dd0d" - version = "v1.22.2" + revision = "cf5210b77b6f9d40c4c34a0bc793f3bdbe4bc877" + version = "v1.23.17" [[projects]] branch = "master" @@ -132,27 +141,12 @@ version = "v1.0.1" [[projects]] - digest = "1:ad70cf78ff17abf96d92a6082f4d3241fef8f149118f87c3a267ed47a08be603" - name = "github.com/census-instrumentation/opencensus-proto" - packages = [ - "gen-go/agent/common/v1", - "gen-go/agent/metrics/v1", - "gen-go/agent/trace/v1", - "gen-go/metrics/v1", - "gen-go/resource/v1", - "gen-go/trace/v1", - ] - pruneopts = "" - revision = "d89fa54de508111353cb0b06403c00569be780d8" - version = "v0.2.1" - -[[projects]] - digest = "1:f6485831252319cd6ca29fc170adecf1eb81bf1e805f62f44eb48564ce2485fe" + digest = "1:545ae40d6dde46043a71bdfd7f9a17f2353ce16277c83ac685af231b4b7c4beb" name = "github.com/cespare/xxhash" packages = ["."] pruneopts = "" - revision = "3b82fb7d186719faeedd0c2864f868c74fbf79a1" - version = "v2.0.0" + revision = "de209a9ffae3256185a6bb135d1a0ada7b2b5f09" + version = "v2.1.0" [[projects]] digest = "1:193f6d32d751f26540aa8eeedc114ce0a51f9e77b6c22dda3a4db4e5f65aec66" @@ -178,6 +172,17 @@ revision = "06ea1031745cb8b3dab3f6a236daf2b0aa468b7e" version = "v3.2.0" +[[projects]] + digest = "1:7bb8712cb8f2c0b6a2aa63df15e861931c17cf7abb5caef59744278be2a122df" + name = "github.com/emicklei/go-restful" + packages = [ + ".", + "log", + ] + pruneopts = "" + revision = "6ac3b8eb89d325e5c750d77f344a6870464d03c3" + version = "v2.9.6" + [[projects]] digest = "1:46ddeb9dd35d875ac7568c4dc1fc96ce424e034bdbb984239d8ffc151398ec01" name = "github.com/evanphx/json-patch" @@ -227,7 +232,39 @@ version = "v0.1.1" [[projects]] - digest = "1:c2db84082861ca42d0b00580d28f4b31aceec477a00a38e1a057fb3da75c8adc" + digest = "1:21911d0d3cecc86a42fd1920583c34a33b91035d77d4929772938961d7814ffc" + name = "github.com/go-openapi/jsonpointer" + packages = ["."] + pruneopts = "" + revision = "a105a905c5e6ad147f08504784917f3e178e0ba5" + version = "v0.19.2" + +[[projects]] + digest = "1:6ec9ec804d37dfca7ce0e488844fb069cfe4e3eb60793d163279083b8ec61a8d" + name = "github.com/go-openapi/jsonreference" + packages = ["."] + pruneopts = "" + revision = "2903bfd4bfbaf188694f1edf731f2725a8fa344f" + version = "v0.19.2" + +[[projects]] + digest = "1:0bf906c8db0e821fa588499950b59d349e4edccad44383c806319035b8bd5f89" + name = "github.com/go-openapi/spec" + packages = ["."] + pruneopts = "" + revision = "bdfd7e07daecc404d77868a88b2364d0aed0ee5a" + version = "v0.19.2" + +[[projects]] + digest = "1:fb1a3f651afb10230982d116bef8cb05dff148c5d3243c8ed79ef78d51f1ebe7" + name = "github.com/go-openapi/swag" + packages = ["."] + pruneopts = "" + revision = "c3d0f7896d589f3babb99eea24bbc7de98108e72" + version = "v0.19.5" + +[[projects]] + digest = "1:b994001ce7517c69ce8173ba12463f329c3fe8aecae84be6a334eae89a99f2fd" name = "github.com/go-redis/redis" packages = [ ".", @@ -239,19 +276,19 @@ "internal/util", ] pruneopts = "" - revision = "75795aa4236dc7341eefac3bbe945e68c99ef9df" - version = "v6.15.3" + revision = "17c058513b3e03c5e23136c18582fdd8ac8a3645" + version = "v6.15.5" [[projects]] - digest = "1:fd53b471edb4c28c7d297f617f4da0d33402755f58d6301e7ca1197ef0a90937" + digest = "1:8a7fe65e9ac2612c4df602cc9f014a92406776d993ff0f28335e5a8831d87c53" name = "github.com/gogo/protobuf" packages = [ "proto", "sortkeys", ] pruneopts = "" - revision = "ba06b47c162d49f2af050fb4c75bcbc86a159d5c" - version = "v1.2.1" + revision = "0ca988a254f991240804bf9821f3450d87ccbb1b" + version = "v1.3.0" [[projects]] branch = "master" @@ -307,7 +344,15 @@ version = "v1.1.1" [[projects]] - digest = "1:5facc3828b6a56f9aec988433ea33fb4407a89460952ed75be5347cec07318c0" + digest = "1:6120f027b9d68ef460b8731e27b0dcf2017f80605c17eb0b4cc151866ba38f6d" + name = "github.com/googleapis/gax-go" + packages = ["v2"] + pruneopts = "" + revision = "bd5b16380fd03dc758d11cef74ba2e3bc8b0e8c2" + version = "v2.0.5" + +[[projects]] + digest = "1:728f28282e0edc47e2d8f41c9ec1956ad645ad6b15e6376ab31e2c3b094fc38f" name = "github.com/googleapis/gnostic" packages = [ "OpenAPIv2", @@ -315,8 +360,8 @@ "extensions", ] pruneopts = "" - revision = "e73c7ec21d36ddb0711cb36d1502d18363b5c2c9" - version = "v0.3.0" + revision = "ab0dd09aa10e2952b28e12ecd35681b20463ebab" + version = "v0.3.1" [[projects]] digest = "1:1ea91d049b6a609f628ecdfda32e85f445a0d3671980dcbf7cbe1bbd7ee6aabc" @@ -366,7 +411,7 @@ version = "v1.2.0" [[projects]] - digest = "1:4ab82898193e99be9d4f1f1eb4ca3b1113ab6b7b2ff4605198ae305de864f05e" + digest = "1:0ebfd2f00a84ee4fb31913b49011b7fa2fb6b12040991d8b948db821a15f7f77" name = "github.com/grpc-ecosystem/grpc-gateway" packages = [ "internal", @@ -375,8 +420,8 @@ "utilities", ] pruneopts = "" - revision = "ad529a448ba494a88058f9e5be0988713174ac86" - version = "v1.9.5" + revision = "471f45a5a99a578de7a8638dc7ed29e245bde097" + version = "v1.11.1" [[projects]] digest = "1:7f6f07500a0b7d3766b00fa466040b97f2f5b5f3eef2ecabfe516e703b05119a" @@ -448,7 +493,20 @@ version = "v1.0.2" [[projects]] - digest = "1:2b5f0e6bc8fb862fed5bccf9fbb1ab819c8b3f8a21e813fe442c06aec3bb3e86" + branch = "master" + digest = "1:b08f87013402c4ee47570439505804b1e3cebdc1137a95810e72770a4a65dd77" + name = "github.com/kubeflow/crd-validation" + packages = [ + "pkg/config", + "pkg/crd/exporter", + "pkg/utils", + ] + pruneopts = "" + revision = "a760b49f15a9cafa507cc00b49126b00f8c4238b" + source = "github.com/bnsblue/crd-validation.git" + +[[projects]] + digest = "1:9ebd60eefac400693896f8e2960c2755e5255a9f02e6d50ab47616b236e56ed0" name = "github.com/lyft/flyteidl" packages = [ "clients/go/admin", @@ -466,12 +524,12 @@ "gen/pb-go/flyteidl/service", ] pruneopts = "" - revision = "793b09d190148236f41ad8160b5cec9a3325c16f" + revision = "c92b79f5f448ec36420eb79bbebb2b372261b77f" source = "https://github.com/lyft/flyteidl" - version = "v0.1.0" + version = "v0.1.1" [[projects]] - digest = "1:500471ee50c4141d3523c79615cc90529b3152f8aa5924b63122df6bf201a7a0" + digest = "1:719cc580829b9d8e84461913e73ffd67716f65329e344cb7df2f91d3c2e4fd5b" name = "github.com/lyft/flyteplugins" packages = [ "go/tasks", @@ -493,9 +551,9 @@ "go/tasks/v1/utils", ] pruneopts = "" - revision = "8c85a7c9f19de4df4767de329c56a7f09d0a7bbc" + revision = "9156da396c7af5b34b4411c3ec99470864425b18" source = "https://github.com/lyft/flyteplugins" - version = "v0.1.0" + version = "v0.1.1" [[projects]] digest = "1:77615fd7bcfd377c5e898c41d33be827f108166691cb91257d27113ee5d08650" @@ -535,6 +593,18 @@ revision = "de8848e004dd33dc07a2947b3d76f618a7fc7ef1" version = "v1.8.1" +[[projects]] + branch = "master" + digest = "1:101e8200d89dcff2cec2522e427298045bea6d81ef71f8fe10810faeae741efc" + name = "github.com/mailru/easyjson" + packages = [ + "buffer", + "jlexer", + "jwriter", + ] + pruneopts = "" + revision = "b2ccc519800e761ac8000b95e5d57c80a897ff9e" + [[projects]] digest = "1:9ea83adf8e96d6304f394d40436f2eb44c1dc3250d223b74088cc253a6cd0a1c" name = "github.com/mattn/go-colorable" @@ -544,12 +614,12 @@ version = "v0.0.9" [[projects]] - digest = "1:dbfae9da5a674236b914e486086671145b37b5e3880a38da906665aede3c9eab" + digest = "1:afc2714dedf683e571932f94f8a8ec444679eb84e076e021f63de871c5bc6cb1" name = "github.com/mattn/go-isatty" packages = ["."] pruneopts = "" - revision = "1311e847b0cb909da63b5fecfb5370aa66236465" - version = "v0.0.8" + revision = "e1f7b56ace729e4a73a29a6b4fac6cd5fcda7ab3" + version = "v0.0.9" [[projects]] digest = "1:63722a4b1e1717be7b98fc686e0b30d5e7f734b9e93d7dee86293b6deab7ea28" @@ -661,11 +731,11 @@ [[projects]] branch = "master" - digest = "1:cd67319ee7536399990c4b00fae07c3413035a53193c644549a676091507cadc" + digest = "1:0a565f69553dd41b3de790fde3532e9237142f2637899e20cd3e7396f0c4f2f7" name = "github.com/prometheus/client_model" packages = ["go"] pruneopts = "" - revision = "fd36f4220a901265f90734c3183c5f0c91daa0b8" + revision = "14fe0d1b01d4d5fc031dd4bec1823bd3ebbe8016" [[projects]] digest = "1:0f2cee44695a3208fe5d6926076641499c72304e6f015348c9ab2df90a202cdf" @@ -680,15 +750,16 @@ version = "v0.6.0" [[projects]] - digest = "1:9b33e539d6bf6e4453668a847392d1e9e6345225ea1426f9341212c652bcbee4" + digest = "1:e010d89927008cac947ad9650f643a1b2b668dde47adfe56664da8694c1541d1" name = "github.com/prometheus/procfs" packages = [ ".", "internal/fs", + "internal/util", ] pruneopts = "" - revision = "3f98efb27840a48a7a2898ec80be07674d19f9c8" - version = "v0.0.3" + revision = "00ec24a6a2d86e7074629c8384715dbb05adccd8" + version = "v0.0.4" [[projects]] digest = "1:7f569d906bdd20d906b606415b7d794f798f91a62fcfb6a4daa6d50690fb7a3f" @@ -750,11 +821,12 @@ version = "v1.0.3" [[projects]] - digest = "1:c25a789c738f7cc8ec7f34026badd4e117853f329334a5aa45cf5d0727d7d442" + digest = "1:9b483544fcf4fc0155e566f49ee669c205fba12a36eb18e7f80510796a606db4" name = "github.com/spf13/viper" packages = ["."] pruneopts = "" - revision = "ae103d7e593e371c69e832d5eb3347e2b80cbbc9" + revision = "b5bf975e5823809fb22c7644d008757f78a4259e" + version = "v1.4.0" [[projects]] digest = "1:711eebe744c0151a9d09af2315f0bb729b2ec7637ef4c410fa90a18ef74b65b6" @@ -765,28 +837,27 @@ version = "v0.1.1" [[projects]] - digest = "1:381bcbeb112a51493d9d998bbba207a529c73dbb49b3fd789e48c63fac1f192c" + digest = "1:f7b541897bcde05a04a044c342ddc7425aab7e331f37b47fbb486cd16324b48e" name = "github.com/stretchr/testify" packages = [ "assert", "mock", ] pruneopts = "" - revision = "ffdc059bfe9ce6a4e144ba849dbedead332c6053" - version = "v1.3.0" + revision = "221dbe5ed46703ee255b1da0dec05086f5035f62" + version = "v1.4.0" [[projects]] - digest = "1:98f63c8942146f9bf4b3925db1d96637b86c1d83693a894a244eae54aa53bb40" + digest = "1:1967fb934ef747bf690fcc56487a06c46bf674bd91cb3381a78a7e4d5c2e1a82" name = "go.opencensus.io" packages = [ ".", - "exemplar", "internal", "internal/tagencoding", - "plugin/ocgrpc", + "metric/metricdata", + "metric/metricproducer", "plugin/ochttp", "plugin/ochttp/propagation/b3", - "plugin/ochttp/propagation/tracecontext", "resource", "stats", "stats/internal", @@ -798,7 +869,8 @@ "trace/tracestate", ] pruneopts = "" - revision = "aab39bd6a98b853ab66c8a564f5d6cfcad59ce8a" + revision = "59d1ce35d30f3c25ba762169da2a37eab6ffa041" + version = "v0.22.1" [[projects]] digest = "1:e6ff7840319b6fda979a918a8801005ec2049abca62af19211d96971d8ec3327" @@ -833,15 +905,15 @@ [[projects]] branch = "master" - digest = "1:086760278d762dbb0e9a26e09b57f04c89178c86467d8d94fae47d64c222f328" + digest = "1:a530f8e0c0ee8a3b440f9f0b0e9f4e5d5e47cfe3a581086ce32cd8ba114ddf4f" name = "golang.org/x/crypto" packages = ["ssh/terminal"] pruneopts = "" - revision = "4def268fd1a49955bfb3dda92fe3db4f924f2285" + revision = "9756ffdc24725223350eb3266ffb92590d28f278" [[projects]] branch = "master" - digest = "1:955694a7c42527d7fb188505a22f10b3e158c6c2cf31fe64b1e62c9ab7b18401" + digest = "1:87c06c289123bf8be0a776c57ca40ce075f6c598a905ff2ff8ba40fba0d5d17c" name = "golang.org/x/net" packages = [ "context", @@ -854,7 +926,7 @@ "trace", ] pruneopts = "" - revision = "ca1201d0de80cfde86cb01aea620983605dfe99b" + revision = "ba9fcec4b297b415637633c5a6e8fa592e4a16c3" [[projects]] branch = "master" @@ -872,22 +944,14 @@ [[projects]] branch = "master" - digest = "1:9f6efefb4e401a4f699a295d14518871368eb89403f2dd23ec11dfcd2c0836ba" - name = "golang.org/x/sync" - packages = ["semaphore"] - pruneopts = "" - revision = "112230192c580c3556b8cee6403af37a4fc5f28c" - -[[projects]] - branch = "master" - digest = "1:0b5c2207c72f2d13995040f176feb6e3f453d6b01af2b9d57df76b05ded2e926" + digest = "1:ffaa20332022643a821848aa2322787bbfbf06bceb4b4e84cde3b05d07fa51ac" name = "golang.org/x/sys" packages = [ "unix", "windows", ] pruneopts = "" - revision = "51ab0e2deafac1f46c46ad59cf0921be2f180c3d" + revision = "749cb33beabd9aa6d3178e3de05bcc914f70b2bf" [[projects]] digest = "1:740b51a55815493a8d0f2b1e0d0ae48fe48953bf7eaf3fcc4198823bf67768c0" @@ -909,6 +973,7 @@ "unicode/cldr", "unicode/norm", "unicode/rangetable", + "width", ] pruneopts = "" revision = "342b2e1fbaa52c93f31447ad2c6abc048c63e475" @@ -924,7 +989,7 @@ [[projects]] branch = "master" - digest = "1:3f52587092bc722a3c3843989e6b88ec26924dc4b7b9c971095b7e93a11e0eff" + digest = "1:ca88bdd01148915799f251f7c45f34d91e2f63a56b75ce8a45f7fe18704b9def" name = "golang.org/x/tools" packages = [ "go/ast/astutil", @@ -941,11 +1006,11 @@ "internal/semver", ] pruneopts = "" - revision = "e713427fea3f98cb070e72a058c557a1a560cf22" + revision = "12febf440ab165c4216be22da05880e7fd2e968f" [[projects]] branch = "master" - digest = "1:f77558501305be5977ac30110f9820d21c5f1a89328667dc82db0bd9ebaab4c4" + digest = "1:b94fcda151123f06c8d67e9b27d076e04006d1ab33e52babd40eeb66a1559ab1" name = "google.golang.org/api" packages = [ "gensupport", @@ -955,15 +1020,14 @@ "internal", "option", "storage/v1", - "support/bundler", "transport/http", "transport/http/internal/propagation", ] pruneopts = "" - revision = "6f3912904777a209e099b9dbda3ed7bcb4e25ad7" + revision = "c5ff4101c09da19daa147f5d98245a08bfea9838" [[projects]] - digest = "1:47f391ee443f578f01168347818cb234ed819521e49e4d2c8dd2fb80d48ee41a" + digest = "1:0568e577f790e9bd0420521cff50580f9b38165a38f217ce68f55c4bbaa97066" name = "google.golang.org/appengine" packages = [ ".", @@ -978,12 +1042,12 @@ "urlfetch", ] pruneopts = "" - revision = "b2f4a3cf3c67576a2ee09e1fe62656a5086ce880" - version = "v1.6.1" + revision = "5f2a59506353b8d5ba8cbbcd9f3c1f41f1eaf079" + version = "v1.6.2" [[projects]] branch = "master" - digest = "1:95b0a53d4d31736b2483a8c41667b2bd83f303706106f81bd2f54e3f9c24eaf4" + digest = "1:d57fc4649c80e946db4ae2064153e5896dc45936752db1ade3d94c52734116c2" name = "google.golang.org/genproto" packages = [ "googleapis/api/annotations", @@ -992,10 +1056,10 @@ "protobuf/field_mask", ] pruneopts = "" - revision = "fa694d86fc64c7654a660f8908de4e879866748d" + revision = "92dd089d5514cecde7a465f807541f83dfd486d5" [[projects]] - digest = "1:425ee670b3e8b6562e31754021a82d78aa46b9281247827376616c8aa78f4687" + digest = "1:e8a4007e58ea9431f6460d1bc5c7f9dd29fdc0211ab780b6ad3d0581478f2076" name = "google.golang.org/grpc" packages = [ ".", @@ -1033,8 +1097,8 @@ "tap", ] pruneopts = "" - revision = "045159ad57f3781d409358e3ade910a018c16b30" - version = "v1.22.1" + revision = "6eaf6f47437a6b4e2153a190160ef39a92c7eceb" + version = "v1.23.0" [[projects]] digest = "1:75fb3fcfc73a8c723efde7777b40e8e8ff9babf30d8c56160d01beffea8a95a6" @@ -1094,6 +1158,17 @@ revision = "27b77cf22008a0bf6e510b2a500b8885805a1b68" source = "https://github.com/lyft/api" +[[projects]] + digest = "1:24a4a1bd22e4a3b19b8d8451f2042b2675de61e12c0d190fe98053aedc4d77db" + name = "k8s.io/apiextensions-apiserver" + packages = [ + "pkg/apis/apiextensions", + "pkg/apis/apiextensions/v1beta1", + ] + pruneopts = "" + revision = "878b1211abf130817a11f74ba007f1f19f89a9e3" + version = "kubernetes-1.13.10" + [[projects]] digest = "1:a3bee4b1e4013573fc15631b51a7b7e0d580497e6fec63dc3724b370e624569f" name = "k8s.io/apimachinery" @@ -1256,7 +1331,7 @@ [[projects]] branch = "master" - digest = "1:6a2a63e09a59caff3fd2d36d69b7b92c2fe7cf783390f0b7349fb330820f9a8e" + digest = "1:f007c3788c6e24308be8893b12397b20cbbeb9b81a451de4af495a051b5cd554" name = "k8s.io/gengo" packages = [ "args", @@ -1269,7 +1344,7 @@ "types", ] pruneopts = "" - revision = "e17681d19d3ac4837a019ece36c2a0ec31ffe985" + revision = "a874a240740c2ae854082ec73d46c5efcedd2149" [[projects]] digest = "1:3063061b6514ad2666c4fa292451685884cacf77c803e1b10b4a4fa23f7787fb" @@ -1280,12 +1355,19 @@ version = "v0.4.0" [[projects]] - branch = "master" - digest = "1:3176cac3365c8442ab92d465e69e05071b0dbc0d715e66b76059b04611811dff" + digest = "1:71e59e355758d825c891c77bfe3ec2c0b2523b05076e96b2a2bfa804e6ac576a" name = "k8s.io/kube-openapi" - packages = ["pkg/util/proto"] + packages = [ + "cmd/openapi-gen", + "cmd/openapi-gen/args", + "pkg/common", + "pkg/generators", + "pkg/generators/rules", + "pkg/util/proto", + "pkg/util/sets", + ] pruneopts = "" - revision = "5e22f3d471e6f24ca20becfdffdc6206c7cecac8" + revision = "743ec37842bffe49dd4221d9026f30fb1d5adbc4" [[projects]] digest = "1:77629c3c036454b4623e99e20f5591b9551dd81d92db616384af92435b52e9b6" @@ -1338,12 +1420,16 @@ "github.com/DiSiqueira/GoTree", "github.com/fatih/color", "github.com/ghodss/yaml", + "github.com/go-openapi/spec", "github.com/golang/protobuf/jsonpb", "github.com/golang/protobuf/proto", "github.com/golang/protobuf/ptypes", "github.com/golang/protobuf/ptypes/struct", "github.com/golang/protobuf/ptypes/timestamp", "github.com/grpc-ecosystem/go-grpc-middleware/retry", + "github.com/kubeflow/crd-validation/pkg/config", + "github.com/kubeflow/crd-validation/pkg/crd/exporter", + "github.com/kubeflow/crd-validation/pkg/utils", "github.com/lyft/flyteidl/clients/go/admin", "github.com/lyft/flyteidl/clients/go/admin/mocks", "github.com/lyft/flyteidl/clients/go/coreutils", @@ -1379,6 +1465,7 @@ "github.com/prometheus/client_golang/prometheus", "github.com/spf13/cobra", "github.com/spf13/pflag", + "github.com/spf13/viper", "github.com/stretchr/testify/assert", "github.com/stretchr/testify/mock", "golang.org/x/time/rate", @@ -1387,6 +1474,7 @@ "google.golang.org/grpc/status", "k8s.io/api/batch/v1", "k8s.io/api/core/v1", + "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1", "k8s.io/apimachinery/pkg/api/errors", "k8s.io/apimachinery/pkg/api/resource", "k8s.io/apimachinery/pkg/apis/meta/v1", @@ -1422,6 +1510,8 @@ "k8s.io/code-generator/cmd/informer-gen", "k8s.io/code-generator/cmd/lister-gen", "k8s.io/gengo/args", + "k8s.io/kube-openapi/cmd/openapi-gen", + "k8s.io/kube-openapi/pkg/common", "sigs.k8s.io/controller-runtime/pkg/cache", "sigs.k8s.io/controller-runtime/pkg/cache/informertest", "sigs.k8s.io/controller-runtime/pkg/client", diff --git a/Gopkg.toml b/Gopkg.toml index 1a0e8974e..f6872eac7 100644 --- a/Gopkg.toml +++ b/Gopkg.toml @@ -31,6 +31,7 @@ required = [ "k8s.io/code-generator/cmd/client-gen", "k8s.io/code-generator/cmd/lister-gen", "k8s.io/code-generator/cmd/informer-gen", + "k8s.io/kube-openapi/cmd/openapi-gen", "k8s.io/gengo/args", ] @@ -85,6 +86,10 @@ required = [ # revision = "6702109cc68eb6fe6350b83e14407c8d7309fd1a" version = "kubernetes-1.13.5" +[[override]] + name = "k8s.io/kube-openapi" + revision = "743ec37842bffe49dd4221d9026f30fb1d5adbc4" + [[override]] name = "github.com/graymeta/stow" revision = "903027f87de7054953efcdb8ba70d5dc02df38c7" @@ -100,3 +105,12 @@ required = [ [[override]] branch = "master" name = "golang.org/x/net" + +[[constraint]] + name = "github.com/kubeflow/crd-validation" + source = "github.com/bnsblue/crd-validation.git" + branch = "master" + +[[override]] + name = "github.com/spf13/viper" + version = "1.4.0" diff --git a/Makefile b/Makefile index 30db27782..986dea55a 100644 --- a/Makefile +++ b/Makefile @@ -25,6 +25,7 @@ cross_compile: op_code_generate: @RESOURCE_NAME=flyteworkflow OPERATOR_PKG=github.com/lyft/flytepropeller ./hack/update-codegen.sh + @openapi-gen -i github.com/lyft/flytepropeller/pkg/apis/flyteworkflow/v1alpha1 -p github.com/lyft/flytepropeller/pkg/apis/flyteworkflow/v1alpha1 benchmark: mkdir -p ./bin/benchmark diff --git a/cmd/kubectl-flyte/cmd/crd/flyteworkflow.go b/cmd/kubectl-flyte/cmd/crd/flyteworkflow.go new file mode 100644 index 000000000..ab7f71c79 --- /dev/null +++ b/cmd/kubectl-flyte/cmd/crd/flyteworkflow.go @@ -0,0 +1,43 @@ +package crd + +import ( + "github.com/lyft/flytepropeller/pkg/apis/flyteworkflow/v1alpha1" + apiextensions "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1" + "log" + + "github.com/kubeflow/crd-validation/pkg/crd/exporter" + "github.com/kubeflow/crd-validation/pkg/utils" +) + +const ( + // CRDName is the name for FlyteWorkflow. + CRDNameFlyteWorkflow = "github.com/lyft/flytepropeller/pkg/apis/flyteworkflow/v1alpha1.FlyteWorkflow" + + generatedFileFlyteWorkflow = "flyteworkflow-crd-v1alpha1.yaml" +) + +// FlyteWorkflowGenerator is the type for FlyteWorkflow CRD generator. +type FlyteWorkflowGenerator struct { + *exporter.Exporter +} + +// Creates a new CRD generator which outputs to a file. +func NewFlyteWorkflowGenerator(outputDir string) *FlyteWorkflowGenerator { + return &FlyteWorkflowGenerator{ + Exporter: exporter.NewFileExporter(outputDir, generatedFileFlyteWorkflow), + } +} + +// Creates a new CRD generator which outputs to stdout. +func NewFlyteWorkflowGeneratorStdout() *FlyteWorkflowGenerator { + return &FlyteWorkflowGenerator{ + Exporter: exporter.NewStdoutExporter(), + } +} + +// Generate generates the crd. +func (t FlyteWorkflowGenerator) Generate(original *apiextensions.CustomResourceDefinition) *apiextensions.CustomResourceDefinition { + log.Println("Generating validation") + original.Spec.Validation = utils.GetCustomResourceValidation(CRDNameFlyteWorkflow, v1alpha1.GetOpenAPIDefinitions) + return original +} \ No newline at end of file diff --git a/cmd/kubectl-flyte/cmd/crd_validation.go b/cmd/kubectl-flyte/cmd/crd_validation.go new file mode 100644 index 000000000..87ae16575 --- /dev/null +++ b/cmd/kubectl-flyte/cmd/crd_validation.go @@ -0,0 +1,96 @@ +package cmd + +import ( + "github.com/spf13/viper" + "log" + + compilerErrors "github.com/lyft/flytepropeller/pkg/compiler/errors" + + "github.com/pkg/errors" + "github.com/spf13/cobra" + + "github.com/kubeflow/crd-validation/pkg/config" + "github.com/lyft/flytepropeller/cmd/kubectl-flyte/cmd/crd" +) + +const ( + configKey = "config-file" + baseCrdKey = "base-crd" +) + + +const crdValidationCmdName = "crd-validation" + +type CrdValidationOpts struct { + *RootOptions + configFile string + baseCrdFile string + dryRun bool +} + +func NewCrdValidationCommand(opts *RootOptions) *cobra.Command { + + crdValidationOpts := &CrdValidationOpts{ + RootOptions: opts, + } + + crdValidationCmd := &cobra.Command{ + Use: crdValidationCmdName, + Aliases: []string{"validate"}, + Short: "Augment a CRD YAML file with validation section based on a base CRD file", + Long: ``, + RunE: func(cmd *cobra.Command, args []string) error { + if err := requiredFlags(cmd, baseCrdKey); err != nil { + return err + } + + log.Println("Line numbers in errors enabled") + compilerErrors.SetIncludeSource() + + return crdValidationOpts.generateValidation() + }, + } + + crdValidationCmd.Flags().StringVarP(&crdValidationOpts.configFile, configKey, "c", "", "Path of the config file for the execution of CRD validation") + crdValidationCmd.Flags().StringVarP(&crdValidationOpts.baseCrdFile, baseCrdKey, "b", "", "Path to base CRD file.") + crdValidationCmd.Flags().BoolVarP(&crdValidationOpts.dryRun, "dry-run", "d", false, "Compiles and transforms, but does not create a workflow. OutputsRef ts to STDOUT.") + + return crdValidationCmd +} + +func (c *CrdValidationOpts) initConfig() error { + if c.configFile != "" { // enable ability to specify config file via flag + viper.SetConfigFile(c.configFile) + log.Println("Using config file:", viper.ConfigFileUsed()) + } + + viper.SetConfigType("yaml") // Set config type to yaml + + // If a config file is found, read it in. + if err := viper.ReadInConfig(); err != nil { + return errors.Wrapf(err, "Failed to read config file.") + } else { + log.Println("Using config file:", viper.ConfigFileUsed()) + } + return nil +} + + +func (c *CrdValidationOpts) generateValidation() error { + + err := c.initConfig() + var generator *crd.FlyteWorkflowGenerator + if err != nil { + log.Println("Output will be written to Stdout") + generator = crd.NewFlyteWorkflowGeneratorStdout() + } else { + crdValidationConfig := config.GetCrdValidationConfig() + generator = crd.NewFlyteWorkflowGenerator(crdValidationConfig.OutputDir) + } + + original := config.NewCustomResourceDefinition(c.baseCrdFile) + final := generator.Generate(original) + generator.Export(final) + + return nil +} diff --git a/cmd/kubectl-flyte/cmd/root.go b/cmd/kubectl-flyte/cmd/root.go index f56009f43..bc60647b5 100644 --- a/cmd/kubectl-flyte/cmd/root.go +++ b/cmd/kubectl-flyte/cmd/root.go @@ -98,6 +98,7 @@ func NewFlyteCommand() *cobra.Command { command.AddCommand(NewGetCommand(rootOpts)) command.AddCommand(NewVisualizeCommand(rootOpts)) command.AddCommand(NewCreateCommand(rootOpts)) + command.AddCommand(NewCrdValidationCommand(rootOpts)) command.AddCommand(NewCompileCommand(rootOpts)) loadingRules := clientcmd.NewDefaultClientConfigLoadingRules() diff --git a/pkg/apis/flyteworkflow/v1alpha1/branch.go b/pkg/apis/flyteworkflow/v1alpha1/branch.go index 692e73e0e..1357d8222 100644 --- a/pkg/apis/flyteworkflow/v1alpha1/branch.go +++ b/pkg/apis/flyteworkflow/v1alpha1/branch.go @@ -71,6 +71,7 @@ func (in *IfBlock) GetThenNode() *NodeID { type BranchNodeSpec struct { If IfBlock `json:"if"` + // +listType=atomic ElseIf []*IfBlock `json:"elseIf,omitempty"` Else *NodeID `json:"else,omitempty"` ElseFail *Error `json:"elseFail,omitempty"` diff --git a/pkg/apis/flyteworkflow/v1alpha1/doc.go b/pkg/apis/flyteworkflow/v1alpha1/doc.go index 37762e696..7ac2fcc58 100644 --- a/pkg/apis/flyteworkflow/v1alpha1/doc.go +++ b/pkg/apis/flyteworkflow/v1alpha1/doc.go @@ -1,4 +1,5 @@ // +k8s:deepcopy-gen=package +// +k8s:openapi-gen=true // Package v1alpha1 is the v1alpha1 version of the API. // +groupName=flyteworkflow.flyte.net diff --git a/pkg/apis/flyteworkflow/v1alpha1/nodes.go b/pkg/apis/flyteworkflow/v1alpha1/nodes.go index 3a6fa0bfe..db046b23b 100644 --- a/pkg/apis/flyteworkflow/v1alpha1/nodes.go +++ b/pkg/apis/flyteworkflow/v1alpha1/nodes.go @@ -97,9 +97,11 @@ type NodeSpec struct { BranchNode *BranchNodeSpec `json:"branch,omitempty"` TaskRef *TaskID `json:"task,omitempty"` WorkflowNode *WorkflowNodeSpec `json:"workflow,omitempty"` + // +listType=atomic InputBindings []*Binding `json:"inputBindings,omitempty"` Config *typesv1.ConfigMap `json:"config,omitempty"` RetryStrategy *RetryStrategy `json:"retry,omitempty"` + // +listType=atomic OutputAliases []Alias `json:"outputAlias,omitempty"` // SecurityContext holds pod-level security attributes and common container settings. @@ -113,6 +115,7 @@ type NodeSpec struct { // +optional // +patchMergeKey=name // +patchStrategy=merge + // +listType=atomic ImagePullSecrets []typesv1.LocalObjectReference `json:"imagePullSecrets,omitempty" patchStrategy:"merge" patchMergeKey:"name" protobuf:"bytes,15,rep,name=imagePullSecrets"` // Specifies the hostname of the Pod // If not specified, the pod's hostname will be set to a system-defined value. @@ -131,6 +134,7 @@ type NodeSpec struct { SchedulerName string `json:"schedulerName,omitempty" protobuf:"bytes,19,opt,name=schedulerName"` // If specified, the pod's tolerations. // +optional + // +listType=atomic Tolerations []typesv1.Toleration `json:"tolerations,omitempty" protobuf:"bytes,22,opt,name=tolerations"` // StartTime before the system will actively try to mark it failed and kill associated containers. // Value must be a positive integer. diff --git a/pkg/apis/flyteworkflow/v1alpha1/openapi_generated.go b/pkg/apis/flyteworkflow/v1alpha1/openapi_generated.go new file mode 100644 index 000000000..5c3b2e432 --- /dev/null +++ b/pkg/apis/flyteworkflow/v1alpha1/openapi_generated.go @@ -0,0 +1,1162 @@ +// +build !ignore_autogenerated + +/* +Copyright The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by openapi-gen. DO NOT EDIT. + +// This file was autogenerated by openapi-gen. Do not edit it manually! + +package v1alpha1 + +import ( + spec "github.com/go-openapi/spec" + common "k8s.io/kube-openapi/pkg/common" +) + +func GetOpenAPIDefinitions(ref common.ReferenceCallback) map[string]common.OpenAPIDefinition { + return map[string]common.OpenAPIDefinition{ + "github.com/lyft/flytepropeller/pkg/apis/flyteworkflow/v1alpha1.Alias": schema_pkg_apis_flyteworkflow_v1alpha1_Alias(ref), + "github.com/lyft/flytepropeller/pkg/apis/flyteworkflow/v1alpha1.Binding": schema_pkg_apis_flyteworkflow_v1alpha1_Binding(ref), + "github.com/lyft/flytepropeller/pkg/apis/flyteworkflow/v1alpha1.BooleanExpression": schema_pkg_apis_flyteworkflow_v1alpha1_BooleanExpression(ref), + "github.com/lyft/flytepropeller/pkg/apis/flyteworkflow/v1alpha1.BranchNodeSpec": schema_pkg_apis_flyteworkflow_v1alpha1_BranchNodeSpec(ref), + "github.com/lyft/flytepropeller/pkg/apis/flyteworkflow/v1alpha1.BranchNodeStatus": schema_pkg_apis_flyteworkflow_v1alpha1_BranchNodeStatus(ref), + "github.com/lyft/flytepropeller/pkg/apis/flyteworkflow/v1alpha1.Connections": schema_pkg_apis_flyteworkflow_v1alpha1_Connections(ref), + "github.com/lyft/flytepropeller/pkg/apis/flyteworkflow/v1alpha1.DynamicNodeStatus": schema_pkg_apis_flyteworkflow_v1alpha1_DynamicNodeStatus(ref), + "github.com/lyft/flytepropeller/pkg/apis/flyteworkflow/v1alpha1.Error": schema_pkg_apis_flyteworkflow_v1alpha1_Error(ref), + "github.com/lyft/flytepropeller/pkg/apis/flyteworkflow/v1alpha1.FlyteWorkflow": schema_pkg_apis_flyteworkflow_v1alpha1_FlyteWorkflow(ref), + "github.com/lyft/flytepropeller/pkg/apis/flyteworkflow/v1alpha1.FlyteWorkflowList": schema_pkg_apis_flyteworkflow_v1alpha1_FlyteWorkflowList(ref), + "github.com/lyft/flytepropeller/pkg/apis/flyteworkflow/v1alpha1.Identifier": schema_pkg_apis_flyteworkflow_v1alpha1_Identifier(ref), + "github.com/lyft/flytepropeller/pkg/apis/flyteworkflow/v1alpha1.IfBlock": schema_pkg_apis_flyteworkflow_v1alpha1_IfBlock(ref), + "github.com/lyft/flytepropeller/pkg/apis/flyteworkflow/v1alpha1.Inputs": schema_pkg_apis_flyteworkflow_v1alpha1_Inputs(ref), + "github.com/lyft/flytepropeller/pkg/apis/flyteworkflow/v1alpha1.NodeMetadata": schema_pkg_apis_flyteworkflow_v1alpha1_NodeMetadata(ref), + "github.com/lyft/flytepropeller/pkg/apis/flyteworkflow/v1alpha1.NodeSpec": schema_pkg_apis_flyteworkflow_v1alpha1_NodeSpec(ref), + "github.com/lyft/flytepropeller/pkg/apis/flyteworkflow/v1alpha1.NodeStatus": schema_pkg_apis_flyteworkflow_v1alpha1_NodeStatus(ref), + "github.com/lyft/flytepropeller/pkg/apis/flyteworkflow/v1alpha1.OutputVarMap": schema_pkg_apis_flyteworkflow_v1alpha1_OutputVarMap(ref), + "github.com/lyft/flytepropeller/pkg/apis/flyteworkflow/v1alpha1.RetryStrategy": schema_pkg_apis_flyteworkflow_v1alpha1_RetryStrategy(ref), + "github.com/lyft/flytepropeller/pkg/apis/flyteworkflow/v1alpha1.SubWorkflowNodeStatus": schema_pkg_apis_flyteworkflow_v1alpha1_SubWorkflowNodeStatus(ref), + "github.com/lyft/flytepropeller/pkg/apis/flyteworkflow/v1alpha1.TaskExecutionIdentifier": schema_pkg_apis_flyteworkflow_v1alpha1_TaskExecutionIdentifier(ref), + "github.com/lyft/flytepropeller/pkg/apis/flyteworkflow/v1alpha1.TaskNodeStatus": schema_pkg_apis_flyteworkflow_v1alpha1_TaskNodeStatus(ref), + "github.com/lyft/flytepropeller/pkg/apis/flyteworkflow/v1alpha1.TaskSpec": schema_pkg_apis_flyteworkflow_v1alpha1_TaskSpec(ref), + "github.com/lyft/flytepropeller/pkg/apis/flyteworkflow/v1alpha1.WorkflowExecutionIdentifier": schema_pkg_apis_flyteworkflow_v1alpha1_WorkflowExecutionIdentifier(ref), + "github.com/lyft/flytepropeller/pkg/apis/flyteworkflow/v1alpha1.WorkflowNodeSpec": schema_pkg_apis_flyteworkflow_v1alpha1_WorkflowNodeSpec(ref), + "github.com/lyft/flytepropeller/pkg/apis/flyteworkflow/v1alpha1.WorkflowNodeStatus": schema_pkg_apis_flyteworkflow_v1alpha1_WorkflowNodeStatus(ref), + "github.com/lyft/flytepropeller/pkg/apis/flyteworkflow/v1alpha1.WorkflowSpec": schema_pkg_apis_flyteworkflow_v1alpha1_WorkflowSpec(ref), + "github.com/lyft/flytepropeller/pkg/apis/flyteworkflow/v1alpha1.WorkflowStatus": schema_pkg_apis_flyteworkflow_v1alpha1_WorkflowStatus(ref), + } +} + +func schema_pkg_apis_flyteworkflow_v1alpha1_Alias(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "Alias": { + SchemaProps: spec.SchemaProps{ + Ref: ref("github.com/lyft/flyteidl/gen/pb-go/flyteidl/core.Alias"), + }, + }, + }, + Required: []string{"Alias"}, + }, + }, + Dependencies: []string{ + "github.com/lyft/flyteidl/gen/pb-go/flyteidl/core.Alias"}, + } +} + +func schema_pkg_apis_flyteworkflow_v1alpha1_Binding(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "Binding": { + SchemaProps: spec.SchemaProps{ + Ref: ref("github.com/lyft/flyteidl/gen/pb-go/flyteidl/core.Binding"), + }, + }, + }, + Required: []string{"Binding"}, + }, + }, + Dependencies: []string{ + "github.com/lyft/flyteidl/gen/pb-go/flyteidl/core.Binding"}, + } +} + +func schema_pkg_apis_flyteworkflow_v1alpha1_BooleanExpression(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "BooleanExpression": { + SchemaProps: spec.SchemaProps{ + Ref: ref("github.com/lyft/flyteidl/gen/pb-go/flyteidl/core.BooleanExpression"), + }, + }, + }, + Required: []string{"BooleanExpression"}, + }, + }, + Dependencies: []string{ + "github.com/lyft/flyteidl/gen/pb-go/flyteidl/core.BooleanExpression"}, + } +} + +func schema_pkg_apis_flyteworkflow_v1alpha1_BranchNodeSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "if": { + SchemaProps: spec.SchemaProps{ + Ref: ref("github.com/lyft/flytepropeller/pkg/apis/flyteworkflow/v1alpha1.IfBlock"), + }, + }, + "elseIf": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-type": "atomic", + }, + }, + SchemaProps: spec.SchemaProps{ + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("github.com/lyft/flytepropeller/pkg/apis/flyteworkflow/v1alpha1.IfBlock"), + }, + }, + }, + }, + }, + "else": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + "elseFail": { + SchemaProps: spec.SchemaProps{ + Ref: ref("github.com/lyft/flytepropeller/pkg/apis/flyteworkflow/v1alpha1.Error"), + }, + }, + }, + Required: []string{"if"}, + }, + }, + Dependencies: []string{ + "github.com/lyft/flytepropeller/pkg/apis/flyteworkflow/v1alpha1.Error", "github.com/lyft/flytepropeller/pkg/apis/flyteworkflow/v1alpha1.IfBlock"}, + } +} + +func schema_pkg_apis_flyteworkflow_v1alpha1_BranchNodeStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "phase": { + SchemaProps: spec.SchemaProps{ + Type: []string{"integer"}, + Format: "int32", + }, + }, + "finalNodeId": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + Required: []string{"phase", "finalNodeId"}, + }, + }, + } +} + +func schema_pkg_apis_flyteworkflow_v1alpha1_Connections(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "DownstreamEdges": { + SchemaProps: spec.SchemaProps{ + Type: []string{"object"}, + AdditionalProperties: &spec.SchemaOrBool{ + Allows: true, + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + }, + }, + }, + "UpstreamEdges": { + SchemaProps: spec.SchemaProps{ + Type: []string{"object"}, + AdditionalProperties: &spec.SchemaOrBool{ + Allows: true, + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + }, + }, + }, + }, + Required: []string{"DownstreamEdges", "UpstreamEdges"}, + }, + }, + } +} + +func schema_pkg_apis_flyteworkflow_v1alpha1_DynamicNodeStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "phase": { + SchemaProps: spec.SchemaProps{ + Type: []string{"integer"}, + Format: "int32", + }, + }, + }, + Required: []string{"phase"}, + }, + }, + } +} + +func schema_pkg_apis_flyteworkflow_v1alpha1_Error(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "Error": { + SchemaProps: spec.SchemaProps{ + Ref: ref("github.com/lyft/flyteidl/gen/pb-go/flyteidl/core.Error"), + }, + }, + }, + Required: []string{"Error"}, + }, + }, + Dependencies: []string{ + "github.com/lyft/flyteidl/gen/pb-go/flyteidl/core.Error"}, + } +} + +func schema_pkg_apis_flyteworkflow_v1alpha1_FlyteWorkflow(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "FlyteWorkflow: represents one Execution Workflow object", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "kind": { + SchemaProps: spec.SchemaProps{ + Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", + Type: []string{"string"}, + Format: "", + }, + }, + "apiVersion": { + SchemaProps: spec.SchemaProps{ + Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources", + Type: []string{"string"}, + Format: "", + }, + }, + "metadata": { + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + }, + }, + "spec": { + SchemaProps: spec.SchemaProps{ + Ref: ref("github.com/lyft/flytepropeller/pkg/apis/flyteworkflow/v1alpha1.WorkflowSpec"), + }, + }, + "inputs": { + SchemaProps: spec.SchemaProps{ + Ref: ref("github.com/lyft/flytepropeller/pkg/apis/flyteworkflow/v1alpha1.Inputs"), + }, + }, + "executionId": { + SchemaProps: spec.SchemaProps{ + Ref: ref("github.com/lyft/flytepropeller/pkg/apis/flyteworkflow/v1alpha1.WorkflowExecutionIdentifier"), + }, + }, + "tasks": { + SchemaProps: spec.SchemaProps{ + Type: []string{"object"}, + AdditionalProperties: &spec.SchemaOrBool{ + Allows: true, + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("github.com/lyft/flytepropeller/pkg/apis/flyteworkflow/v1alpha1.TaskSpec"), + }, + }, + }, + }, + }, + "subWorkflows": { + SchemaProps: spec.SchemaProps{ + Type: []string{"object"}, + AdditionalProperties: &spec.SchemaOrBool{ + Allows: true, + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("github.com/lyft/flytepropeller/pkg/apis/flyteworkflow/v1alpha1.WorkflowSpec"), + }, + }, + }, + }, + }, + "activeDeadlineSeconds": { + SchemaProps: spec.SchemaProps{ + Description: "StartTime before the system will actively try to mark it failed and kill associated containers. Value must be a positive integer.", + Type: []string{"integer"}, + Format: "int64", + }, + }, + "acceptedAt": { + SchemaProps: spec.SchemaProps{ + Description: "Specifies the time when the workflow has been accepted into the system. (e.g. When Flyte Admin received the request to create an execution).", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + }, + }, + "serviceAccountName": { + SchemaProps: spec.SchemaProps{ + Description: "ServiceAccountName is the name of the ServiceAccount to use to run this pod. More info: https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/", + Type: []string{"string"}, + Format: "", + }, + }, + "status": { + SchemaProps: spec.SchemaProps{ + Description: "Status is the only mutable section in the workflow. It holds all the execution information", + Ref: ref("github.com/lyft/flytepropeller/pkg/apis/flyteworkflow/v1alpha1.WorkflowStatus"), + }, + }, + }, + Required: []string{"spec", "executionId", "tasks"}, + }, + }, + Dependencies: []string{ + "github.com/lyft/flytepropeller/pkg/apis/flyteworkflow/v1alpha1.Inputs", "github.com/lyft/flytepropeller/pkg/apis/flyteworkflow/v1alpha1.TaskSpec", "github.com/lyft/flytepropeller/pkg/apis/flyteworkflow/v1alpha1.WorkflowExecutionIdentifier", "github.com/lyft/flytepropeller/pkg/apis/flyteworkflow/v1alpha1.WorkflowSpec", "github.com/lyft/flytepropeller/pkg/apis/flyteworkflow/v1alpha1.WorkflowStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta", "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, + } +} + +func schema_pkg_apis_flyteworkflow_v1alpha1_FlyteWorkflowList(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "FlyteWorkflowList is a list of Foo resources", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "kind": { + SchemaProps: spec.SchemaProps{ + Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", + Type: []string{"string"}, + Format: "", + }, + }, + "apiVersion": { + SchemaProps: spec.SchemaProps{ + Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources", + Type: []string{"string"}, + Format: "", + }, + }, + "metadata": { + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + }, + }, + "items": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-type": "atomic", + }, + }, + SchemaProps: spec.SchemaProps{ + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("github.com/lyft/flytepropeller/pkg/apis/flyteworkflow/v1alpha1.FlyteWorkflow"), + }, + }, + }, + }, + }, + }, + Required: []string{"metadata", "items"}, + }, + }, + Dependencies: []string{ + "github.com/lyft/flytepropeller/pkg/apis/flyteworkflow/v1alpha1.FlyteWorkflow", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + } +} + +func schema_pkg_apis_flyteworkflow_v1alpha1_Identifier(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "Identifier": { + SchemaProps: spec.SchemaProps{ + Ref: ref("github.com/lyft/flyteidl/gen/pb-go/flyteidl/core.Identifier"), + }, + }, + }, + Required: []string{"Identifier"}, + }, + }, + Dependencies: []string{ + "github.com/lyft/flyteidl/gen/pb-go/flyteidl/core.Identifier"}, + } +} + +func schema_pkg_apis_flyteworkflow_v1alpha1_IfBlock(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "condition": { + SchemaProps: spec.SchemaProps{ + Ref: ref("github.com/lyft/flytepropeller/pkg/apis/flyteworkflow/v1alpha1.BooleanExpression"), + }, + }, + "then": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + Required: []string{"condition", "then"}, + }, + }, + Dependencies: []string{ + "github.com/lyft/flytepropeller/pkg/apis/flyteworkflow/v1alpha1.BooleanExpression"}, + } +} + +func schema_pkg_apis_flyteworkflow_v1alpha1_Inputs(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "LiteralMap": { + SchemaProps: spec.SchemaProps{ + Ref: ref("github.com/lyft/flyteidl/gen/pb-go/flyteidl/core.LiteralMap"), + }, + }, + }, + Required: []string{"LiteralMap"}, + }, + }, + Dependencies: []string{ + "github.com/lyft/flyteidl/gen/pb-go/flyteidl/core.LiteralMap"}, + } +} + +func schema_pkg_apis_flyteworkflow_v1alpha1_NodeMetadata(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "NodeMetadata": { + SchemaProps: spec.SchemaProps{ + Ref: ref("github.com/lyft/flyteidl/gen/pb-go/flyteidl/core.NodeMetadata"), + }, + }, + }, + Required: []string{"NodeMetadata"}, + }, + }, + Dependencies: []string{ + "github.com/lyft/flyteidl/gen/pb-go/flyteidl/core.NodeMetadata"}, + } +} + +func schema_pkg_apis_flyteworkflow_v1alpha1_NodeSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "id": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + "resources": { + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/core/v1.ResourceRequirements"), + }, + }, + "kind": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + "branch": { + SchemaProps: spec.SchemaProps{ + Ref: ref("github.com/lyft/flytepropeller/pkg/apis/flyteworkflow/v1alpha1.BranchNodeSpec"), + }, + }, + "task": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + "workflow": { + SchemaProps: spec.SchemaProps{ + Ref: ref("github.com/lyft/flytepropeller/pkg/apis/flyteworkflow/v1alpha1.WorkflowNodeSpec"), + }, + }, + "inputBindings": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-type": "atomic", + }, + }, + SchemaProps: spec.SchemaProps{ + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("github.com/lyft/flytepropeller/pkg/apis/flyteworkflow/v1alpha1.Binding"), + }, + }, + }, + }, + }, + "config": { + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/core/v1.ConfigMap"), + }, + }, + "retry": { + SchemaProps: spec.SchemaProps{ + Ref: ref("github.com/lyft/flytepropeller/pkg/apis/flyteworkflow/v1alpha1.RetryStrategy"), + }, + }, + "outputAlias": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-type": "atomic", + }, + }, + SchemaProps: spec.SchemaProps{ + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("github.com/lyft/flytepropeller/pkg/apis/flyteworkflow/v1alpha1.Alias"), + }, + }, + }, + }, + }, + "securityContext": { + SchemaProps: spec.SchemaProps{ + Description: "SecurityContext holds pod-level security attributes and common container settings. Optional: Defaults to empty. See type description for default values of each field.", + Ref: ref("k8s.io/api/core/v1.PodSecurityContext"), + }, + }, + "imagePullSecrets": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-type": "atomic", + "x-kubernetes-patch-merge-key": "name", + "x-kubernetes-patch-strategy": "merge", + }, + }, + SchemaProps: spec.SchemaProps{ + Description: "ImagePullSecrets is an optional list of references to secrets in the same namespace to use for pulling any of the images used by this PodSpec. If specified, these secrets will be passed to individual puller implementations for them to use. For example, in the case of docker, only DockerConfig type secrets are honored. More info: https://kubernetes.io/docs/concepts/containers/images#specifying-imagepullsecrets-on-a-pod", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/core/v1.LocalObjectReference"), + }, + }, + }, + }, + }, + "hostname": { + SchemaProps: spec.SchemaProps{ + Description: "Specifies the hostname of the Pod If not specified, the pod's hostname will be set to a system-defined value.", + Type: []string{"string"}, + Format: "", + }, + }, + "subdomain": { + SchemaProps: spec.SchemaProps{ + Description: "If specified, the fully qualified Pod hostname will be \"...svc.\". If not specified, the pod will not have a domainname at all.", + Type: []string{"string"}, + Format: "", + }, + }, + "affinity": { + SchemaProps: spec.SchemaProps{ + Description: "If specified, the pod's scheduling constraints", + Ref: ref("k8s.io/api/core/v1.Affinity"), + }, + }, + "schedulerName": { + SchemaProps: spec.SchemaProps{ + Description: "If specified, the pod will be dispatched by specified scheduler. If not specified, the pod will be dispatched by default scheduler.", + Type: []string{"string"}, + Format: "", + }, + }, + "tolerations": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-type": "atomic", + }, + }, + SchemaProps: spec.SchemaProps{ + Description: "If specified, the pod's tolerations.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/core/v1.Toleration"), + }, + }, + }, + }, + }, + "activeDeadlineSeconds": { + SchemaProps: spec.SchemaProps{ + Description: "StartTime before the system will actively try to mark it failed and kill associated containers. Value must be a positive integer.", + Type: []string{"integer"}, + Format: "int64", + }, + }, + }, + Required: []string{"id", "kind"}, + }, + }, + Dependencies: []string{ + "github.com/lyft/flytepropeller/pkg/apis/flyteworkflow/v1alpha1.Alias", "github.com/lyft/flytepropeller/pkg/apis/flyteworkflow/v1alpha1.Binding", "github.com/lyft/flytepropeller/pkg/apis/flyteworkflow/v1alpha1.BranchNodeSpec", "github.com/lyft/flytepropeller/pkg/apis/flyteworkflow/v1alpha1.RetryStrategy", "github.com/lyft/flytepropeller/pkg/apis/flyteworkflow/v1alpha1.WorkflowNodeSpec", "k8s.io/api/core/v1.Affinity", "k8s.io/api/core/v1.ConfigMap", "k8s.io/api/core/v1.LocalObjectReference", "k8s.io/api/core/v1.PodSecurityContext", "k8s.io/api/core/v1.ResourceRequirements", "k8s.io/api/core/v1.Toleration"}, + } +} + +func schema_pkg_apis_flyteworkflow_v1alpha1_NodeStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "phase": { + SchemaProps: spec.SchemaProps{ + Type: []string{"integer"}, + Format: "int32", + }, + }, + "queuedAt": { + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + }, + }, + "startedAt": { + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + }, + }, + "stoppedAt": { + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + }, + }, + "lastUpdatedAt": { + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + }, + }, + "message": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + "dataDir": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + "attempts": { + SchemaProps: spec.SchemaProps{ + Type: []string{"integer"}, + Format: "int64", + }, + }, + "cached": { + SchemaProps: spec.SchemaProps{ + Type: []string{"boolean"}, + Format: "", + }, + }, + "dirty": { + SchemaProps: spec.SchemaProps{ + Type: []string{"boolean"}, + Format: "", + }, + }, + "parentNode": { + SchemaProps: spec.SchemaProps{ + Description: "This is useful only for branch nodes. If this is set, then it can be used to determine if execution can proceed", + Type: []string{"string"}, + Format: "", + }, + }, + "parentTask": { + SchemaProps: spec.SchemaProps{ + Ref: ref("github.com/lyft/flytepropeller/pkg/apis/flyteworkflow/v1alpha1.TaskExecutionIdentifier"), + }, + }, + "branchStatus": { + SchemaProps: spec.SchemaProps{ + Ref: ref("github.com/lyft/flytepropeller/pkg/apis/flyteworkflow/v1alpha1.BranchNodeStatus"), + }, + }, + "subNodeStatus": { + SchemaProps: spec.SchemaProps{ + Type: []string{"object"}, + AdditionalProperties: &spec.SchemaOrBool{ + Allows: true, + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("github.com/lyft/flytepropeller/pkg/apis/flyteworkflow/v1alpha1.NodeStatus"), + }, + }, + }, + }, + }, + "workflowNodeStatus": { + SchemaProps: spec.SchemaProps{ + Ref: ref("github.com/lyft/flytepropeller/pkg/apis/flyteworkflow/v1alpha1.WorkflowNodeStatus"), + }, + }, + "subWorkflowStatus": { + SchemaProps: spec.SchemaProps{ + Ref: ref("github.com/lyft/flytepropeller/pkg/apis/flyteworkflow/v1alpha1.SubWorkflowNodeStatus"), + }, + }, + "dynamicNodeStatus": { + SchemaProps: spec.SchemaProps{ + Ref: ref("github.com/lyft/flytepropeller/pkg/apis/flyteworkflow/v1alpha1.DynamicNodeStatus"), + }, + }, + }, + Required: []string{"phase", "attempts", "cached", "dirty"}, + }, + }, + Dependencies: []string{ + "github.com/lyft/flytepropeller/pkg/apis/flyteworkflow/v1alpha1.BranchNodeStatus", "github.com/lyft/flytepropeller/pkg/apis/flyteworkflow/v1alpha1.DynamicNodeStatus", "github.com/lyft/flytepropeller/pkg/apis/flyteworkflow/v1alpha1.NodeStatus", "github.com/lyft/flytepropeller/pkg/apis/flyteworkflow/v1alpha1.SubWorkflowNodeStatus", "github.com/lyft/flytepropeller/pkg/apis/flyteworkflow/v1alpha1.TaskExecutionIdentifier", "github.com/lyft/flytepropeller/pkg/apis/flyteworkflow/v1alpha1.WorkflowNodeStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, + } +} + +func schema_pkg_apis_flyteworkflow_v1alpha1_OutputVarMap(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "VariableMap": { + SchemaProps: spec.SchemaProps{ + Ref: ref("github.com/lyft/flyteidl/gen/pb-go/flyteidl/core.VariableMap"), + }, + }, + }, + Required: []string{"VariableMap"}, + }, + }, + Dependencies: []string{ + "github.com/lyft/flyteidl/gen/pb-go/flyteidl/core.VariableMap"}, + } +} + +func schema_pkg_apis_flyteworkflow_v1alpha1_RetryStrategy(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "Strategy to be used to Retry a node that is in RetryableFailure state", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "minAttempts": { + SchemaProps: spec.SchemaProps{ + Description: "MinAttempts implies the atleast n attempts to try this node before giving up. The atleast here is because we may fail to write the attempt information and end up retrying again. Also `0` and `1` both mean atleast one attempt will be done. 0 is a degenerate case.", + Type: []string{"integer"}, + Format: "int32", + }, + }, + }, + Required: []string{"minAttempts"}, + }, + }, + } +} + +func schema_pkg_apis_flyteworkflow_v1alpha1_SubWorkflowNodeStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "phase": { + SchemaProps: spec.SchemaProps{ + Type: []string{"integer"}, + Format: "int32", + }, + }, + }, + Required: []string{"phase"}, + }, + }, + } +} + +func schema_pkg_apis_flyteworkflow_v1alpha1_TaskExecutionIdentifier(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "TaskExecutionIdentifier": { + SchemaProps: spec.SchemaProps{ + Ref: ref("github.com/lyft/flyteidl/gen/pb-go/flyteidl/core.TaskExecutionIdentifier"), + }, + }, + }, + Required: []string{"TaskExecutionIdentifier"}, + }, + }, + Dependencies: []string{ + "github.com/lyft/flyteidl/gen/pb-go/flyteidl/core.TaskExecutionIdentifier"}, + } +} + +func schema_pkg_apis_flyteworkflow_v1alpha1_TaskNodeStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "phase": { + SchemaProps: spec.SchemaProps{ + Type: []string{"integer"}, + Format: "int32", + }, + }, + "phaseVersion": { + SchemaProps: spec.SchemaProps{ + Type: []string{"integer"}, + Format: "int64", + }, + }, + "custom": { + SchemaProps: spec.SchemaProps{ + Type: []string{"object"}, + AdditionalProperties: &spec.SchemaOrBool{ + Allows: true, + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"object"}, + Format: "", + }, + }, + }, + }, + }, + }, + }, + }, + } +} + +func schema_pkg_apis_flyteworkflow_v1alpha1_TaskSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "TaskTemplate": { + SchemaProps: spec.SchemaProps{ + Ref: ref("github.com/lyft/flyteidl/gen/pb-go/flyteidl/core.TaskTemplate"), + }, + }, + }, + Required: []string{"TaskTemplate"}, + }, + }, + Dependencies: []string{ + "github.com/lyft/flyteidl/gen/pb-go/flyteidl/core.TaskTemplate"}, + } +} + +func schema_pkg_apis_flyteworkflow_v1alpha1_WorkflowExecutionIdentifier(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "WorkflowExecutionIdentifier": { + SchemaProps: spec.SchemaProps{ + Ref: ref("github.com/lyft/flyteidl/gen/pb-go/flyteidl/core.WorkflowExecutionIdentifier"), + }, + }, + }, + Required: []string{"WorkflowExecutionIdentifier"}, + }, + }, + Dependencies: []string{ + "github.com/lyft/flyteidl/gen/pb-go/flyteidl/core.WorkflowExecutionIdentifier"}, + } +} + +func schema_pkg_apis_flyteworkflow_v1alpha1_WorkflowNodeSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "launchPlanRefId": { + SchemaProps: spec.SchemaProps{ + Description: "Either one of the two", + Ref: ref("github.com/lyft/flytepropeller/pkg/apis/flyteworkflow/v1alpha1.Identifier"), + }, + }, + "subWorkflowRef": { + SchemaProps: spec.SchemaProps{ + Description: "We currently want the SubWorkflow to be completely contained in the node. this is because We use the node status to store the information of the execution. Important Note: This may cause a bloat in case we use the same SubWorkflow in multiple nodes. The recommended technique for that is to use launch plan refs. This is because we will end up executing the launch plan refs as disparate executions in Flyte propeller. This is potentially better as it prevents us from hitting the storage limit in etcd Workflow *WorkflowSpec `json:\"workflow,omitempty\"`", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + Dependencies: []string{ + "github.com/lyft/flytepropeller/pkg/apis/flyteworkflow/v1alpha1.Identifier"}, + } +} + +func schema_pkg_apis_flyteworkflow_v1alpha1_WorkflowNodeStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "name": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + Required: []string{"name"}, + }, + }, + } +} + +func schema_pkg_apis_flyteworkflow_v1alpha1_WorkflowSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "WorkflowSpec is the spec for the actual Flyte Workflow (DAG)", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "id": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + "nodes": { + SchemaProps: spec.SchemaProps{ + Type: []string{"object"}, + AdditionalProperties: &spec.SchemaOrBool{ + Allows: true, + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("github.com/lyft/flytepropeller/pkg/apis/flyteworkflow/v1alpha1.NodeSpec"), + }, + }, + }, + }, + }, + "connections": { + SchemaProps: spec.SchemaProps{ + Description: "Defines the set of connections (both data dependencies and execution dependencies) that the graph is formed of. The execution engine will respect and follow these connections as it determines which nodes can and should be executed.", + Ref: ref("github.com/lyft/flytepropeller/pkg/apis/flyteworkflow/v1alpha1.Connections"), + }, + }, + "onFailure": { + SchemaProps: spec.SchemaProps{ + Description: "Defines a single node to execute in case the system determined the Workflow has failed.", + Ref: ref("github.com/lyft/flytepropeller/pkg/apis/flyteworkflow/v1alpha1.NodeSpec"), + }, + }, + "outputs": { + SchemaProps: spec.SchemaProps{ + Description: "Defines the declaration of the outputs types and names this workflow is expected to generate.", + Ref: ref("github.com/lyft/flytepropeller/pkg/apis/flyteworkflow/v1alpha1.OutputVarMap"), + }, + }, + "outputBindings": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-type": "atomic", + }, + }, + SchemaProps: spec.SchemaProps{ + Description: "Defines the data links used to construct the final outputs of the workflow. Bindings will typically refer to specific outputs of a subset of the nodes executed in the Workflow. When executing the end-node, the execution engine will traverse these bindings and assemble the final set of outputs of the workflow.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("github.com/lyft/flytepropeller/pkg/apis/flyteworkflow/v1alpha1.Binding"), + }, + }, + }, + }, + }, + }, + Required: []string{"id", "nodes", "connections"}, + }, + }, + Dependencies: []string{ + "github.com/lyft/flytepropeller/pkg/apis/flyteworkflow/v1alpha1.Binding", "github.com/lyft/flytepropeller/pkg/apis/flyteworkflow/v1alpha1.Connections", "github.com/lyft/flytepropeller/pkg/apis/flyteworkflow/v1alpha1.NodeSpec", "github.com/lyft/flytepropeller/pkg/apis/flyteworkflow/v1alpha1.OutputVarMap"}, + } +} + +func schema_pkg_apis_flyteworkflow_v1alpha1_WorkflowStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "phase": { + SchemaProps: spec.SchemaProps{ + Type: []string{"integer"}, + Format: "int32", + }, + }, + "startedAt": { + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + }, + }, + "stoppedAt": { + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + }, + }, + "lastUpdatedAt": { + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + }, + }, + "message": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + "dataDir": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + "outputRef": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + "nodeStatus": { + SchemaProps: spec.SchemaProps{ + Type: []string{"object"}, + AdditionalProperties: &spec.SchemaOrBool{ + Allows: true, + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("github.com/lyft/flytepropeller/pkg/apis/flyteworkflow/v1alpha1.NodeStatus"), + }, + }, + }, + }, + }, + "failedAttempts": { + SchemaProps: spec.SchemaProps{ + Description: "Number of Attempts completed with rounds resulting in error. this is used to cap out poison pill workflows that spin in an error loop. The value should be set at the global level and will be enforced. At the end of the retries the workflow will fail", + Type: []string{"integer"}, + Format: "int64", + }, + }, + }, + Required: []string{"phase"}, + }, + }, + Dependencies: []string{ + "github.com/lyft/flytepropeller/pkg/apis/flyteworkflow/v1alpha1.NodeStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, + } +} diff --git a/pkg/apis/flyteworkflow/v1alpha1/workflow.go b/pkg/apis/flyteworkflow/v1alpha1/workflow.go index c53a680a9..58e75dcbd 100644 --- a/pkg/apis/flyteworkflow/v1alpha1/workflow.go +++ b/pkg/apis/flyteworkflow/v1alpha1/workflow.go @@ -17,6 +17,7 @@ const EndNodeID = "end-node" // +genclient // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +// +k8s:openapi-gen=true // FlyteWorkflow: represents one Execution Workflow object type FlyteWorkflow struct { @@ -168,6 +169,7 @@ type WorkflowSpec struct { // Defines the data links used to construct the final outputs of the workflow. Bindings will typically // refer to specific outputs of a subset of the nodes executed in the Workflow. When executing the end-node, // the execution engine will traverse these bindings and assemble the final set of outputs of the workflow. + // +listType=atomic OutputBindings []*Binding `json:"outputBindings,omitempty"` } @@ -224,9 +226,11 @@ func (in *WorkflowSpec) GetNodes() []NodeID { } // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +// +k8s:openapi-gen:true // FlyteWorkflowList is a list of FlyteWorkflow resources type FlyteWorkflowList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata"` + // +listType=atomic Items []FlyteWorkflow `json:"items"` } From a5de0b85e0a48d903443a5340b30a5ed928b65d2 Mon Sep 17 00:00:00 2001 From: Chang-Hong Hsu Date: Fri, 6 Sep 2019 15:43:09 -0700 Subject: [PATCH 2/8] dummy commit From e57a076a901b65414e9da1645cf4dcc9003ad3e4 Mon Sep 17 00:00:00 2001 From: Chang-Hong Hsu Date: Sat, 7 Sep 2019 09:49:47 -0700 Subject: [PATCH 3/8] create a separate cli for build tools, e.g., crd-validation --- Makefile | 4 ++ .../cmd/crd/flyteworkflow.go | 0 .../cmd/crd_validation.go | 2 +- cmd/build-tool/cmd/root.go | 55 +++++++++++++++++++ cmd/build-tool/cmd/utils.go | 18 ++++++ cmd/build-tool/main.go | 17 ++++++ cmd/kubectl-flyte/cmd/root.go | 2 +- 7 files changed, 96 insertions(+), 2 deletions(-) rename cmd/{kubectl-flyte => build-tool}/cmd/crd/flyteworkflow.go (100%) rename cmd/{kubectl-flyte => build-tool}/cmd/crd_validation.go (97%) create mode 100644 cmd/build-tool/cmd/root.go create mode 100644 cmd/build-tool/cmd/utils.go create mode 100644 cmd/build-tool/main.go diff --git a/Makefile b/Makefile index 986dea55a..84d3d0b53 100644 --- a/Makefile +++ b/Makefile @@ -10,18 +10,21 @@ update_boilerplate: linux_compile: GOOS=linux GOARCH=amd64 CGO_ENABLED=0 go build -o /artifacts/flytepropeller ./cmd/controller/main.go GOOS=linux GOARCH=amd64 CGO_ENABLED=0 go build -o /artifacts/kubectl-flyte ./cmd/kubectl-flyte/main.go + GOOS=linux GOARCH=amd64 CGO_ENABLED=0 go build -o /artifacts/build-tool ./cmd/build-tool/main.go .PHONY: compile compile: mkdir -p ./bin go build -o bin/flytepropeller ./cmd/controller/main.go go build -o bin/kubectl-flyte ./cmd/kubectl-flyte/main.go && cp bin/kubectl-flyte ${GOPATH}/bin + go build -o bin/build-tool ./cmd/build-tool/main.go && cp bin/build-tool ${GOPATH}/bin cross_compile: @glide install @mkdir -p ./bin/cross GOOS=linux GOARCH=amd64 go build -o bin/cross/flytepropeller ./cmd/controller/main.go GOOS=linux GOARCH=amd64 go build -o bin/cross/kubectl-flyte ./cmd/kubectl-flyte/main.go + GOOS=linux GOARCH=amd64 go build -o bin/cross/build-tool ./cmd/build-tool/main.go op_code_generate: @RESOURCE_NAME=flyteworkflow OPERATOR_PKG=github.com/lyft/flytepropeller ./hack/update-codegen.sh @@ -42,4 +45,5 @@ clean: # Generate golden files. Add test packages that generate golden files here. golden: go test ./cmd/kubectl-flyte/cmd -update + go test ./cmd/build-tool/cmd -update go test ./pkg/compiler/test -update diff --git a/cmd/kubectl-flyte/cmd/crd/flyteworkflow.go b/cmd/build-tool/cmd/crd/flyteworkflow.go similarity index 100% rename from cmd/kubectl-flyte/cmd/crd/flyteworkflow.go rename to cmd/build-tool/cmd/crd/flyteworkflow.go diff --git a/cmd/kubectl-flyte/cmd/crd_validation.go b/cmd/build-tool/cmd/crd_validation.go similarity index 97% rename from cmd/kubectl-flyte/cmd/crd_validation.go rename to cmd/build-tool/cmd/crd_validation.go index 87ae16575..19adc5360 100644 --- a/cmd/kubectl-flyte/cmd/crd_validation.go +++ b/cmd/build-tool/cmd/crd_validation.go @@ -10,7 +10,7 @@ import ( "github.com/spf13/cobra" "github.com/kubeflow/crd-validation/pkg/config" - "github.com/lyft/flytepropeller/cmd/kubectl-flyte/cmd/crd" + "github.com/lyft/flytepropeller/cmd/build-tool/cmd/crd" ) const ( diff --git a/cmd/build-tool/cmd/root.go b/cmd/build-tool/cmd/root.go new file mode 100644 index 000000000..2f2bf688e --- /dev/null +++ b/cmd/build-tool/cmd/root.go @@ -0,0 +1,55 @@ +package cmd + +import ( + "context" + "flag" + "fmt" + "os" + "runtime" + + "github.com/lyft/flytestdlib/logger" + "github.com/lyft/flytestdlib/version" + "github.com/spf13/pflag" + + "github.com/spf13/cobra" +) + +func init() { + pflag.CommandLine.AddGoFlagSet(flag.CommandLine) + err := flag.CommandLine.Parse([]string{}) + if err != nil { + logger.Error(context.TODO(), "Error in initializing: %v", err) + os.Exit(-1) + } +} + +type RootOptions struct { + configFile string +} + +func (r *RootOptions) executeRootCmd() error { + ctx := context.TODO() + logger.Infof(ctx, "Go Version: %s", runtime.Version()) + logger.Infof(ctx, "Go OS/Arch: %s/%s", runtime.GOOS, runtime.GOARCH) + version.LogBuildInformation("build-tool") + return fmt.Errorf("use one of the sub-commands") +} + +// NewCommand returns a new instance of an argo command +func NewBuildToolCommand() *cobra.Command { + rootOpts := &RootOptions{} + command := &cobra.Command{ + Use: "build-tool", + Short: "build-tool are utility commands that help validating crds, etc.", + Long: `Flyte is a serverless workflow processing platform built for native execution on K8s. + It is extensible and flexible to allow adding new operators and comes with many operators built in`, + RunE: func(cmd *cobra.Command, args []string) error { + return rootOpts.executeRootCmd() + }, + } + + command.AddCommand(NewCrdValidationCommand(rootOpts)) + return command +} + + diff --git a/cmd/build-tool/cmd/utils.go b/cmd/build-tool/cmd/utils.go new file mode 100644 index 000000000..a2346ae9a --- /dev/null +++ b/cmd/build-tool/cmd/utils.go @@ -0,0 +1,18 @@ +package cmd + +import ( + "fmt" + + "github.com/spf13/cobra" +) + +func requiredFlags(cmd *cobra.Command, flags ...string) error { + for _, flag := range flags { + f := cmd.Flag(flag) + if f == nil { + return fmt.Errorf("unable to find Key [%v]", flag) + } + } + + return nil +} diff --git a/cmd/build-tool/main.go b/cmd/build-tool/main.go new file mode 100644 index 000000000..260ff0b5d --- /dev/null +++ b/cmd/build-tool/main.go @@ -0,0 +1,17 @@ +package main + +import ( + "fmt" + "os" + + "github.com/lyft/flytepropeller/cmd/build-tool/cmd" +) + +func main() { + + rootCmd := cmd.NewBuildToolCommand() + if err := rootCmd.Execute(); err != nil { + fmt.Println(err) + os.Exit(1) + } +} \ No newline at end of file diff --git a/cmd/kubectl-flyte/cmd/root.go b/cmd/kubectl-flyte/cmd/root.go index bc60647b5..e66247371 100644 --- a/cmd/kubectl-flyte/cmd/root.go +++ b/cmd/kubectl-flyte/cmd/root.go @@ -98,7 +98,7 @@ func NewFlyteCommand() *cobra.Command { command.AddCommand(NewGetCommand(rootOpts)) command.AddCommand(NewVisualizeCommand(rootOpts)) command.AddCommand(NewCreateCommand(rootOpts)) - command.AddCommand(NewCrdValidationCommand(rootOpts)) + // command.AddCommand(cmd.NewCrdValidationCommand(rootOpts)) command.AddCommand(NewCompileCommand(rootOpts)) loadingRules := clientcmd.NewDefaultClientConfigLoadingRules() From df76ee91396b0bf5eff3d9083a423122bc17f1ab Mon Sep 17 00:00:00 2001 From: Chang-Hong Hsu Date: Sat, 7 Sep 2019 10:27:15 -0700 Subject: [PATCH 4/8] remove a log --- cmd/build-tool/cmd/crd_validation.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/cmd/build-tool/cmd/crd_validation.go b/cmd/build-tool/cmd/crd_validation.go index 19adc5360..57ca5a788 100644 --- a/cmd/build-tool/cmd/crd_validation.go +++ b/cmd/build-tool/cmd/crd_validation.go @@ -43,8 +43,7 @@ func NewCrdValidationCommand(opts *RootOptions) *cobra.Command { if err := requiredFlags(cmd, baseCrdKey); err != nil { return err } - - log.Println("Line numbers in errors enabled") + compilerErrors.SetIncludeSource() return crdValidationOpts.generateValidation() From 3528efe5aaf1686db70f29fe0bab60f7408bef27 Mon Sep 17 00:00:00 2001 From: Chang-Hong Hsu Date: Sat, 7 Sep 2019 23:59:58 -0700 Subject: [PATCH 5/8] dep ensure update --- Gopkg.lock | 48 ++++++++++++++++++++++++------------------------ 1 file changed, 24 insertions(+), 24 deletions(-) diff --git a/Gopkg.lock b/Gopkg.lock index 893331b62..3c12fdd5f 100644 --- a/Gopkg.lock +++ b/Gopkg.lock @@ -18,7 +18,7 @@ version = "v10.2.1-beta" [[projects]] - digest = "1:efcafb778b0300e3a27d686c0e34c9d61ee03a6fadf942fb2458d3ec014e2d2a" + digest = "1:49d1526a17b46732f253a580a8c978bf8519cfa76e8075d9c8093080360aa104" name = "github.com/Azure/go-autorest" packages = [ "autorest", @@ -29,8 +29,8 @@ "tracing", ] pruneopts = "" - revision = "5e7a399d8bbf4953ab0c8e3167d7fd535fd74ce1" - version = "v13.0.0" + revision = "69b4126ece6b5257e2f9b0017007d2334153655f" + version = "v13.0.1" [[projects]] digest = "1:558b53577dc0c9fde49b08405d706b202bcac3064320e9be53a75fc866280ee3" @@ -232,28 +232,28 @@ version = "v0.1.1" [[projects]] - digest = "1:21911d0d3cecc86a42fd1920583c34a33b91035d77d4929772938961d7814ffc" + digest = "1:47688961daa2895c860642608d671822b7b53fed1e3e3e2d46506f01dcddaae3" name = "github.com/go-openapi/jsonpointer" packages = ["."] pruneopts = "" - revision = "a105a905c5e6ad147f08504784917f3e178e0ba5" - version = "v0.19.2" + revision = "ed123515f087412cd7ef02e49b0b0a5e6a79a360" + version = "v0.19.3" [[projects]] - digest = "1:6ec9ec804d37dfca7ce0e488844fb069cfe4e3eb60793d163279083b8ec61a8d" + digest = "1:69c513ad15614075cbb474bc636fbb901aa3e9273a6da3d583df76fa62ec83d3" name = "github.com/go-openapi/jsonreference" packages = ["."] pruneopts = "" - revision = "2903bfd4bfbaf188694f1edf731f2725a8fa344f" - version = "v0.19.2" + revision = "82f31475a8f7a12bc26962f6e26ceade8ea6f66a" + version = "v0.19.3" [[projects]] - digest = "1:0bf906c8db0e821fa588499950b59d349e4edccad44383c806319035b8bd5f89" + digest = "1:3697981d0c0ed6a7499642163b576705d670f11498ea16c8a332bb95e8514ca5" name = "github.com/go-openapi/spec" packages = ["."] pruneopts = "" - revision = "bdfd7e07daecc404d77868a88b2364d0aed0ee5a" - version = "v0.19.2" + revision = "2223ab324566e4ace63ab69b9c8fff1b81a40eeb" + version = "v0.19.3" [[projects]] digest = "1:fb1a3f651afb10230982d116bef8cb05dff148c5d3243c8ed79ef78d51f1ebe7" @@ -494,7 +494,7 @@ [[projects]] branch = "master" - digest = "1:b08f87013402c4ee47570439505804b1e3cebdc1137a95810e72770a4a65dd77" + digest = "1:4839751396d959c07459fdb71d0fc342a5c8feb61755efde17af9c964d8d423f" name = "github.com/kubeflow/crd-validation" packages = [ "pkg/config", @@ -502,7 +502,7 @@ "pkg/utils", ] pruneopts = "" - revision = "a760b49f15a9cafa507cc00b49126b00f8c4238b" + revision = "f2f9c235c8c1119a5774bab47df12ad1d47a9de6" source = "github.com/bnsblue/crd-validation.git" [[projects]] @@ -905,11 +905,11 @@ [[projects]] branch = "master" - digest = "1:a530f8e0c0ee8a3b440f9f0b0e9f4e5d5e47cfe3a581086ce32cd8ba114ddf4f" + digest = "1:2f8d339c3b89d5abf9a78aafe1e9fbe548f3b1fb9be5c3117036940904d39527" name = "golang.org/x/crypto" packages = ["ssh/terminal"] pruneopts = "" - revision = "9756ffdc24725223350eb3266ffb92590d28f278" + revision = "71b5226ff73902d121cd9dbbdfdb67045a805845" [[projects]] branch = "master" @@ -944,14 +944,14 @@ [[projects]] branch = "master" - digest = "1:ffaa20332022643a821848aa2322787bbfbf06bceb4b4e84cde3b05d07fa51ac" + digest = "1:470393ac1bb6b0f82c2e8120deb134fc350cc1fb49e790513f8d469abc413510" name = "golang.org/x/sys" packages = [ "unix", "windows", ] pruneopts = "" - revision = "749cb33beabd9aa6d3178e3de05bcc914f70b2bf" + revision = "d223b2b6db03988709bac9e66576ad6ec0d83695" [[projects]] digest = "1:740b51a55815493a8d0f2b1e0d0ae48fe48953bf7eaf3fcc4198823bf67768c0" @@ -989,7 +989,7 @@ [[projects]] branch = "master" - digest = "1:ca88bdd01148915799f251f7c45f34d91e2f63a56b75ce8a45f7fe18704b9def" + digest = "1:3d0275a44fb72ab376ccb1ae8d768d8615480196bc971aabdcb59ae46525b21e" name = "golang.org/x/tools" packages = [ "go/ast/astutil", @@ -1006,11 +1006,11 @@ "internal/semver", ] pruneopts = "" - revision = "12febf440ab165c4216be22da05880e7fd2e968f" + revision = "2ca718005c187b688247516b87f8da3b9d03e6b6" [[projects]] branch = "master" - digest = "1:b94fcda151123f06c8d67e9b27d076e04006d1ab33e52babd40eeb66a1559ab1" + digest = "1:de78f8ac31c307b4c9a35fab9c666c835071406cbc4e2ec32da8c55a679b3a98" name = "google.golang.org/api" packages = [ "gensupport", @@ -1024,7 +1024,7 @@ "transport/http/internal/propagation", ] pruneopts = "" - revision = "c5ff4101c09da19daa147f5d98245a08bfea9838" + revision = "c838ec928b3a51991dad090b61963ed230d1aad2" [[projects]] digest = "1:0568e577f790e9bd0420521cff50580f9b38165a38f217ce68f55c4bbaa97066" @@ -1331,7 +1331,7 @@ [[projects]] branch = "master" - digest = "1:f007c3788c6e24308be8893b12397b20cbbeb9b81a451de4af495a051b5cd554" + digest = "1:a8c60fdc825be548a5cd9f599565d2c0dceff8d77a2b5ea00ff891e4aca33de5" name = "k8s.io/gengo" packages = [ "args", @@ -1344,7 +1344,7 @@ "types", ] pruneopts = "" - revision = "a874a240740c2ae854082ec73d46c5efcedd2149" + revision = "ebc107f98eab922ef99d645781b87caca01f4f48" [[projects]] digest = "1:3063061b6514ad2666c4fa292451685884cacf77c803e1b10b4a4fa23f7787fb" From 45451f418fdd41f97a94cc48806e8ec2c25cd6bd Mon Sep 17 00:00:00 2001 From: Chang-Hong Hsu Date: Wed, 25 Sep 2019 15:30:55 -0700 Subject: [PATCH 6/8] Update cmd/build-tool/cmd/crd/flyteworkflow.go Add a new line at the end of the file Co-Authored-By: Haytham AbuelFutuh --- cmd/build-tool/cmd/crd/flyteworkflow.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/build-tool/cmd/crd/flyteworkflow.go b/cmd/build-tool/cmd/crd/flyteworkflow.go index ab7f71c79..bd34efc49 100644 --- a/cmd/build-tool/cmd/crd/flyteworkflow.go +++ b/cmd/build-tool/cmd/crd/flyteworkflow.go @@ -40,4 +40,4 @@ func (t FlyteWorkflowGenerator) Generate(original *apiextensions.CustomResourceD log.Println("Generating validation") original.Spec.Validation = utils.GetCustomResourceValidation(CRDNameFlyteWorkflow, v1alpha1.GetOpenAPIDefinitions) return original -} \ No newline at end of file +} From ff2659d6cf94eedf83d3c6f102592db46a6233c6 Mon Sep 17 00:00:00 2001 From: Chang-Hong Hsu Date: Wed, 25 Sep 2019 15:32:21 -0700 Subject: [PATCH 7/8] Remove an empty line at the beginning of a function Co-Authored-By: Haytham AbuelFutuh --- cmd/build-tool/main.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/cmd/build-tool/main.go b/cmd/build-tool/main.go index 260ff0b5d..caeae0f75 100644 --- a/cmd/build-tool/main.go +++ b/cmd/build-tool/main.go @@ -8,10 +8,9 @@ import ( ) func main() { - rootCmd := cmd.NewBuildToolCommand() if err := rootCmd.Execute(); err != nil { fmt.Println(err) os.Exit(1) } -} \ No newline at end of file +} From b72783122bab8c93d49d229d6dca5bdb15045ea6 Mon Sep 17 00:00:00 2001 From: Chang-Hong Hsu Date: Wed, 25 Sep 2019 15:33:20 -0700 Subject: [PATCH 8/8] Remove unnecessary comment in cmd/kubectl-flyte/cmd/root.go Co-Authored-By: Haytham AbuelFutuh --- cmd/kubectl-flyte/cmd/root.go | 1 - 1 file changed, 1 deletion(-) diff --git a/cmd/kubectl-flyte/cmd/root.go b/cmd/kubectl-flyte/cmd/root.go index e66247371..f56009f43 100644 --- a/cmd/kubectl-flyte/cmd/root.go +++ b/cmd/kubectl-flyte/cmd/root.go @@ -98,7 +98,6 @@ func NewFlyteCommand() *cobra.Command { command.AddCommand(NewGetCommand(rootOpts)) command.AddCommand(NewVisualizeCommand(rootOpts)) command.AddCommand(NewCreateCommand(rootOpts)) - // command.AddCommand(cmd.NewCrdValidationCommand(rootOpts)) command.AddCommand(NewCompileCommand(rootOpts)) loadingRules := clientcmd.NewDefaultClientConfigLoadingRules()