diff --git a/datacatalog/go.mod b/datacatalog/go.mod index 7c04fd7832..1e1500b76f 100644 --- a/datacatalog/go.mod +++ b/datacatalog/go.mod @@ -28,7 +28,7 @@ require ( cloud.google.com/go/compute v1.19.1 // indirect cloud.google.com/go/compute/metadata v0.2.3 // indirect cloud.google.com/go/iam v0.13.0 // indirect - cloud.google.com/go/storage v1.28.1 // indirect + cloud.google.com/go/storage v1.29.0 // indirect github.com/Azure/azure-sdk-for-go/sdk/azcore v1.7.2 // indirect github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.3.1 // indirect github.com/Azure/azure-sdk-for-go/sdk/internal v1.3.0 // indirect @@ -40,7 +40,7 @@ require ( github.com/cespare/xxhash/v2 v2.2.0 // indirect github.com/coocood/freecache v1.1.1 // indirect github.com/davecgh/go-spew v1.1.1 // indirect - github.com/emicklei/go-restful/v3 v3.9.0 // indirect + github.com/emicklei/go-restful/v3 v3.11.0 // indirect github.com/evanphx/json-patch/v5 v5.6.0 // indirect github.com/fatih/color v1.13.0 // indirect github.com/flyteorg/stow v0.3.10 // indirect @@ -79,7 +79,7 @@ require ( github.com/magiconair/properties v1.8.6 // indirect github.com/mailru/easyjson v0.7.7 // indirect github.com/mattn/go-colorable v0.1.12 // indirect - github.com/mattn/go-isatty v0.0.14 // indirect + github.com/mattn/go-isatty v0.0.16 // indirect github.com/mattn/go-sqlite3 v1.14.17 // indirect github.com/matttproud/golang_protobuf_extensions v1.0.4 // indirect github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect @@ -95,7 +95,7 @@ require ( github.com/prometheus/client_model v0.4.0 // indirect github.com/prometheus/common v0.44.0 // indirect github.com/prometheus/procfs v0.10.1 // indirect - github.com/sirupsen/logrus v1.9.2 // indirect + github.com/sirupsen/logrus v1.9.3 // indirect github.com/spf13/afero v1.9.2 // indirect github.com/spf13/cast v1.4.1 // indirect github.com/spf13/jwalterweatherman v1.1.0 // indirect @@ -108,12 +108,12 @@ require ( go.opentelemetry.io/otel/metric v1.19.0 // indirect go.opentelemetry.io/otel/sdk v1.19.0 // indirect go.opentelemetry.io/otel/trace v1.19.0 // indirect - golang.org/x/crypto v0.13.0 // indirect - golang.org/x/exp v0.0.0-20220722155223-a9213eeb770e // indirect - golang.org/x/net v0.15.0 // indirect + golang.org/x/crypto v0.14.0 // indirect + golang.org/x/exp v0.0.0-20231005195138-3e424a577f31 // indirect + golang.org/x/net v0.17.0 // indirect golang.org/x/oauth2 v0.8.0 // indirect - golang.org/x/sys v0.12.0 // indirect - golang.org/x/term v0.12.0 // indirect + golang.org/x/sys v0.13.0 // indirect + golang.org/x/term v0.13.0 // indirect golang.org/x/text v0.13.0 // indirect golang.org/x/time v0.3.0 // indirect golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2 // indirect @@ -127,13 +127,13 @@ require ( gopkg.in/ini.v1 v1.66.4 // indirect gopkg.in/yaml.v2 v2.4.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect - k8s.io/api v0.28.2 // indirect - k8s.io/apimachinery v0.28.2 // indirect - k8s.io/client-go v0.28.1 // indirect + k8s.io/api v0.28.3 // indirect + k8s.io/apimachinery v0.28.3 // indirect + k8s.io/client-go v0.28.3 // indirect k8s.io/klog/v2 v2.100.1 // indirect k8s.io/kube-openapi v0.0.0-20230717233707-2695361300d9 // indirect k8s.io/utils v0.0.0-20230406110748-d93618cff8a2 // indirect - sigs.k8s.io/controller-runtime v0.0.0-00010101000000-000000000000 // indirect + sigs.k8s.io/controller-runtime v0.16.3 // indirect sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect sigs.k8s.io/structured-merge-diff/v4 v4.2.3 // indirect sigs.k8s.io/yaml v1.3.0 // indirect diff --git a/datacatalog/go.sum b/datacatalog/go.sum index b1642f638f..c01243dc4c 100644 --- a/datacatalog/go.sum +++ b/datacatalog/go.sum @@ -45,8 +45,8 @@ cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohl cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs= cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0= cloud.google.com/go/storage v1.14.0/go.mod h1:GrKmX003DSIwi9o29oFT7YDnHYwZoctc3fOKtUw0Xmo= -cloud.google.com/go/storage v1.28.1 h1:F5QDG5ChchaAVQhINh24U99OWHURqrW8OmQcGKXcbgI= -cloud.google.com/go/storage v1.28.1/go.mod h1:Qnisd4CqDdo6BGs2AD5LLnEsmSQ80wQ5ogcBBKhU86Y= +cloud.google.com/go/storage v1.29.0 h1:6weCgzRvMg7lzuUurI4697AqIRPU1SvzHhynwpW31jI= +cloud.google.com/go/storage v1.29.0/go.mod h1:4puEjyTKnku6gfKoTfNOU/W+a9JyuVNxjpS5GBrB8h4= dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= github.com/Azure/azure-sdk-for-go/sdk/azcore v1.7.2 h1:t5+QXLCK9SVi0PPdaY0PrFvYUo24KwA0QwxnaHRSVd4= github.com/Azure/azure-sdk-for-go/sdk/azcore v1.7.2/go.mod h1:bjGvMhVMb+EEm3VRNQawDMUyMMjo+S5ewNjflkep/0Q= @@ -99,8 +99,8 @@ 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/emicklei/go-restful/v3 v3.9.0 h1:XwGDlfxEnQZzuopoqxwSEllNcCOM9DhhFyhFIIGKwxE= -github.com/emicklei/go-restful/v3 v3.9.0/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRry+4bhvbpWn3mrbc= +github.com/emicklei/go-restful/v3 v3.11.0 h1:rAQeMHw1c7zTmncogyy8VvRZwtkmkZ4FxERmMY4rD+g= +github.com/emicklei/go-restful/v3 v3.11.0/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRry+4bhvbpWn3mrbc= github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= @@ -328,8 +328,9 @@ github.com/mattn/go-colorable v0.1.12/go.mod h1:u5H1YNBxpqRaxsYJYSkiCWKzEfiAb1Gb github.com/mattn/go-isatty v0.0.5/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= github.com/mattn/go-isatty v0.0.7/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= -github.com/mattn/go-isatty v0.0.14 h1:yVuAays6BHfxijgZPzw+3Zlu5yQgKGP2/hcQbHb7S9Y= github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94= +github.com/mattn/go-isatty v0.0.16 h1:bq3VjFmv/sOjHtdEhmkEV4x1AJtvUvOJ2PFAZ5+peKQ= +github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= github.com/mattn/go-sqlite3 v1.14.17 h1:mCRHCLDUBXgpKAqIKsaAaAsrAlbkeomtRFKXh2L6YIM= github.com/mattn/go-sqlite3 v1.14.17/go.mod h1:2eHXhiwb8IkHr+BDWZGa96P6+rkvnG63S2DGjv9HUNg= github.com/matttproud/golang_protobuf_extensions v1.0.4 h1:mmDVorXM7PCGKw94cs5zkfA9PSy5pEvNWRP0ET0TIVo= @@ -381,8 +382,8 @@ github.com/satori/go.uuid v1.2.0/go.mod h1:dA0hQrYB0VpLJoorglMZABFdXlWrHn1NEOzdh github.com/shopspring/decimal v0.0.0-20180709203117-cd690d0c9e24/go.mod h1:M+9NzErvs504Cn4c5DxATwIqPbtswREoFCre64PpcG4= github.com/sirupsen/logrus v1.4.1/go.mod h1:ni0Sbl8bgC9z8RoU9G6nDWqqs/fq4eDPysMBDgk/93Q= github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= -github.com/sirupsen/logrus v1.9.2 h1:oxx1eChJGI6Uks2ZC4W1zpLlVgqB8ner4EuQwV4Ik1Y= -github.com/sirupsen/logrus v1.9.2/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= +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.9.2 h1:j49Hj62F0n+DaZ1dDCvhABaPNSGNkt32oRFxI33IEMw= @@ -466,8 +467,8 @@ golang.org/x/crypto v0.0.0-20210711020723-a769d52b0f97/go.mod h1:GvvjBRRGRdwPK5y golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20211108221036-ceb1ce70b4fa/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.6.0/go.mod h1:OFC/31mSvZgRz0V1QTNCzfAI1aIRzbiufJtkMIlEp58= -golang.org/x/crypto v0.13.0 h1:mvySKfSWJ+UKUii46M40LOvyWfN0s2U+46/jDd0e6Ck= -golang.org/x/crypto v0.13.0/go.mod h1:y6Z2r+Rw4iayiXXAIxJIDAJ1zMW4yaTpebo8fPOliYc= +golang.org/x/crypto v0.14.0 h1:wBqGXzWJW6m1XrIKlAH0Hs1JJ7+9KBwnIO8v66Q9cHc= +golang.org/x/crypto v0.14.0/go.mod h1:MVFd36DqK4CsrnJYDkBA3VC4m2GkXAM0PvzMCn4JQf4= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= @@ -478,8 +479,8 @@ golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u0 golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM= golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU= -golang.org/x/exp v0.0.0-20220722155223-a9213eeb770e h1:+WEEuIdZHnUeJJmEUjyYC2gfUMj69yZXw17EnHg/otA= -golang.org/x/exp v0.0.0-20220722155223-a9213eeb770e/go.mod h1:Kr81I6Kryrl9sr8s2FK3vxD90NdsKWRuOIl2O4CvYbA= +golang.org/x/exp v0.0.0-20231005195138-3e424a577f31 h1:9k5exFQKQglLo+RoP+4zMjOFE14P6+vyR0baDAi0Rcs= +golang.org/x/exp v0.0.0-20231005195138-3e424a577f31/go.mod h1:S2oDrQGGwySpoQPVqRShND87VCbxmc6bL1Yd2oYrm6k= golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= @@ -540,8 +541,8 @@ golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= -golang.org/x/net v0.15.0 h1:ugBLEUaxABaB5AJqW9enI0ACdci2RUd4eP51NTBvuJ8= -golang.org/x/net v0.15.0/go.mod h1:idbUs1IY1+zTqbi8yxTbhexhEEk5ur9LInksu6HrEpk= +golang.org/x/net v0.17.0 h1:pVaXccu2ozPjCXewfr1S7xza/zcXTity9cCdXQYSjIM= +golang.org/x/net v0.17.0/go.mod h1:NxSsAGuq816PNPmqtQdLE42eU2Fs7NoRIZrHJAlaCOE= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -612,16 +613,17 @@ golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBc 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.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.12.0 h1:CM0HF96J0hcLAwsHPJZjfdNzs0gftsLfgKt57wWHJ0o= -golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.13.0 h1:Af8nKPmuFypiUBjVoU9V20FiaFXOcuZI21p0ycVYYGE= +golang.org/x/sys v0.13.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw= 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.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k= -golang.org/x/term v0.12.0 h1:/ZfYdc3zq+q02Rv9vGqTeSItdzZTSNDmfTi0mBAuidU= -golang.org/x/term v0.12.0/go.mod h1:owVbMEjm3cBLCHdkQu9b1opXd4ETQWc3BhuQGKgXgvU= +golang.org/x/term v0.13.0 h1:bb+I9cTfFazGW51MZqBVmZy7+JEJMouUHTUSKVQLBek= +golang.org/x/term v0.13.0/go.mod h1:LTmsnFJwVN6bCy1rVCoS+qHT1HhALEFxKncY3WNNh4U= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -690,8 +692,8 @@ golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4f 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.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= -golang.org/x/tools v0.9.3 h1:Gn1I8+64MsuTb/HpH+LmQtNas23LhUVr3rYZ0eKuaMM= -golang.org/x/tools v0.9.3/go.mod h1:owI94Op576fPu3cIGQeHs3joujW/2Oc6MtlxbF5dfNc= +golang.org/x/tools v0.13.0 h1:Iey4qkscZuv0VvIt8E0neZjtPVQFSc870HQ448QgEmQ= +golang.org/x/tools v0.13.0/go.mod h1:HvlwmtVNQAhOuCjW7xxvovg8wbNq7LwfXh/k7wXUl58= golang.org/x/xerrors v0.0.0-20190410155217-1f06c39b4373/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20190513163551-3ee3066db522/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= diff --git a/datacatalog/pkg/errors/errors.go b/datacatalog/pkg/errors/errors.go index ac778f00ad..37643a2365 100644 --- a/datacatalog/pkg/errors/errors.go +++ b/datacatalog/pkg/errors/errors.go @@ -51,7 +51,7 @@ func NewCollectedErrors(code codes.Code, errors []error) error { errorCollection[idx] = err.Error() } - return NewDataCatalogError(code, strings.Join((errorCollection), ", ")) + return NewDataCatalogError(code, strings.Join(errorCollection, ", ")) } func IsAlreadyExistsError(err error) bool { diff --git a/datacatalog/pkg/manager/impl/artifact_manager.go b/datacatalog/pkg/manager/impl/artifact_manager.go index 40f3f40538..5a965e249a 100644 --- a/datacatalog/pkg/manager/impl/artifact_manager.go +++ b/datacatalog/pkg/manager/impl/artifact_manager.go @@ -45,6 +45,9 @@ type artifactMetrics struct { updateDataFailureCounter labeled.Counter deleteDataSuccessCounter labeled.Counter deleteDataFailureCounter labeled.Counter + deleteResponseTime labeled.StopWatch + deleteSuccessCounter labeled.Counter + deleteFailureCounter labeled.Counter } type artifactManager struct { @@ -53,7 +56,8 @@ type artifactManager struct { systemMetrics artifactMetrics } -// Create an Artifact along with the associated ArtifactData. The ArtifactData will be stored in an offloaded location. +// CreateArtifact creates an Artifact along with the associated ArtifactData. The ArtifactData will be stored in an +// offloaded location. func (m *artifactManager) CreateArtifact(ctx context.Context, request *datacatalog.CreateArtifactRequest) (*datacatalog.CreateArtifactResponse, error) { timer := m.systemMetrics.createResponseTime.Start(ctx) defer timer.Stop() @@ -129,7 +133,7 @@ func (m *artifactManager) CreateArtifact(ctx context.Context, request *datacatal return &datacatalog.CreateArtifactResponse{}, nil } -// Get the Artifact and its associated ArtifactData. The request can query by ArtifactID or TagName. +// GetArtifact retrieves the Artifact and its associated ArtifactData. The request can query by ArtifactID or TagName. func (m *artifactManager) GetArtifact(ctx context.Context, request *datacatalog.GetArtifactRequest) (*datacatalog.GetArtifactResponse, error) { timer := m.systemMetrics.getResponseTime.Start(ctx) defer timer.Stop() @@ -240,6 +244,8 @@ func (m *artifactManager) getArtifactDataList(ctx context.Context, artifactDataM return artifactDataList, nil } +// ListArtifacts returns a paginated list of artifacts matching the provided filter expression, including their +// associated artifact data. func (m *artifactManager) ListArtifacts(ctx context.Context, request *datacatalog.ListArtifactsRequest) (*datacatalog.ListArtifactsResponse, error) { err := validators.ValidateListArtifactRequest(request) if err != nil { @@ -359,7 +365,7 @@ func (m *artifactManager) UpdateArtifact(ctx context.Context, request *datacatal dataLocation, err := m.artifactStore.PutData(ctx, artifact, artifactData) if err != nil { - logger.Errorf(ctx, "Failed to store artifact data during update, err: %v", err) + logger.Errorf(ctx, "Failed to store artifact data [%v] during update, err: %v", artifactData.Name, err) m.systemMetrics.updateDataFailureCounter.Inc(ctx) m.systemMetrics.updateFailureCounter.Inc(ctx) return nil, err @@ -416,6 +422,67 @@ func (m *artifactManager) UpdateArtifact(ctx context.Context, request *datacatal }, nil } +func (m *artifactManager) deleteArtifact(ctx context.Context, datasetID *datacatalog.DatasetID, queryHandle artifactQueryHandle) error { + ctx = contextutils.WithProjectDomain(ctx, datasetID.Project, datasetID.Domain) + + // artifact must already exist, verify first + artifactModel, err := m.findArtifact(ctx, datasetID, queryHandle) + if err != nil { + logger.Errorf(ctx, "Failed to get artifact while trying to delete [%v], err: %v", queryHandle, err) + return err + } + + // delete all artifact data from the blob storage + for _, artifactData := range artifactModel.ArtifactData { + if err := m.artifactStore.DeleteData(ctx, artifactData); err != nil { + logger.Errorf(ctx, "Failed to delete artifact data [%v] while deleting artifact [%v], err: %v", artifactData.Name, artifactModel.ArtifactID, err) + m.systemMetrics.deleteDataFailureCounter.Inc(ctx) + return err + } + + m.systemMetrics.deleteDataSuccessCounter.Inc(ctx) + } + + // delete artifact from DB, also removed associated artifact data entries + err = m.repo.ArtifactRepo().Delete(ctx, artifactModel) + if err != nil { + if errors.IsDoesNotExistError(err) { + logger.Warnf(ctx, "Artifact [%v] does not exist, err %v", artifactModel.ArtifactID, err) + m.systemMetrics.doesNotExistCounter.Inc(ctx) + } else { + logger.Errorf(ctx, "Failed to delete artifact [%v], err: %v", artifactModel, err) + } + return err + } + + logger.Debugf(ctx, "Successfully deleted artifact [%v]", artifactModel.ArtifactID) + return nil +} + +// DeleteArtifact deletes the given artifact, removing all stored artifact data from the underlying blob storage. +func (m *artifactManager) DeleteArtifact(ctx context.Context, request *datacatalog.DeleteArtifactRequest) (*datacatalog.DeleteArtifactResponse, error) { + ctx = contextutils.WithProjectDomain(ctx, request.Dataset.Project, request.Dataset.Domain) + + timer := m.systemMetrics.deleteResponseTime.Start(ctx) + defer timer.Stop() + + err := validators.ValidateDeleteArtifactRequest(request) + if err != nil { + logger.Warningf(ctx, "Invalid delete artifacts request %v, err: %v", request, err) + m.systemMetrics.validationErrorCounter.Inc(ctx) + m.systemMetrics.deleteFailureCounter.Inc(ctx) + return nil, err + } + + if err := m.deleteArtifact(ctx, request.GetDataset(), request); err != nil { + m.systemMetrics.deleteFailureCounter.Inc(ctx) + return nil, err + } + + m.systemMetrics.deleteSuccessCounter.Inc(ctx) + return &datacatalog.DeleteArtifactResponse{}, nil +} + func NewArtifactManager(repo repositories.RepositoryInterface, store *storage.DataStore, storagePrefix storage.DataReference, artifactScope promutils.Scope) interfaces.ArtifactManager { artifactMetrics := artifactMetrics{ scope: artifactScope, @@ -440,6 +507,9 @@ func NewArtifactManager(repo repositories.RepositoryInterface, store *storage.Da updateDataFailureCounter: labeled.NewCounter("update_data_failure_count", "The number of times update artifact data failed", artifactScope, labeled.EmitUnlabeledMetric), deleteDataSuccessCounter: labeled.NewCounter("delete_data_success_count", "The number of times delete artifact data succeeded", artifactScope, labeled.EmitUnlabeledMetric), deleteDataFailureCounter: labeled.NewCounter("delete_data_failure_count", "The number of times delete artifact data failed", artifactScope, labeled.EmitUnlabeledMetric), + deleteResponseTime: labeled.NewStopWatch("delete_duration", "The duration of the delete artifact calls.", time.Millisecond, artifactScope, labeled.EmitUnlabeledMetric), + deleteSuccessCounter: labeled.NewCounter("delete_success_count", "The number of times delete artifact succeeded", artifactScope, labeled.EmitUnlabeledMetric), + deleteFailureCounter: labeled.NewCounter("delete_failure_count", "The number of times delete artifact failed", artifactScope, labeled.EmitUnlabeledMetric), } return &artifactManager{ diff --git a/datacatalog/pkg/manager/impl/artifact_manager_test.go b/datacatalog/pkg/manager/impl/artifact_manager_test.go index 2bf39b04d9..e86ddf4bf5 100644 --- a/datacatalog/pkg/manager/impl/artifact_manager_test.go +++ b/datacatalog/pkg/manager/impl/artifact_manager_test.go @@ -837,6 +837,93 @@ func TestUpdateArtifact(t *testing.T) { assert.Nil(t, artifactResponse) }) + t.Run("Artifact not found during update", func(t *testing.T) { + ctx := context.Background() + datastore := createInmemoryDataStore(t, mockScope.NewTestScope()) + mockArtifactModel := getExpectedArtifactModel(ctx, t, datastore, expectedArtifact) + + dcRepo := newMockDataCatalogRepo() + dcRepo.MockArtifactRepo.On("Get", + mock.MatchedBy(func(ctx context.Context) bool { return true }), + mock.MatchedBy(func(artifactKey models.ArtifactKey) bool { + return artifactKey.ArtifactID == expectedArtifact.Id && + artifactKey.DatasetProject == expectedArtifact.Dataset.Project && + artifactKey.DatasetDomain == expectedArtifact.Dataset.Domain && + artifactKey.DatasetName == expectedArtifact.Dataset.Name && + artifactKey.DatasetVersion == expectedArtifact.Dataset.Version + })).Return(mockArtifactModel, nil) + + dcRepo.MockArtifactRepo.On("Update", mock.Anything, mock.Anything).Return(repoErrors.GetMissingEntityError("Artifact", &datacatalog.Artifact{ + Dataset: expectedDataset.Id, + Id: expectedArtifact.Id, + })) + + request := &datacatalog.UpdateArtifactRequest{ + Dataset: expectedDataset.Id, + QueryHandle: &datacatalog.UpdateArtifactRequest_ArtifactId{ + ArtifactId: expectedArtifact.Id, + }, + Data: []*datacatalog.ArtifactData{ + { + Name: "data1", + Value: getTestStringLiteralWithValue("value11"), + }, + { + Name: "data3", + Value: getTestStringLiteralWithValue("value3"), + }, + }, + } + + artifactManager := NewArtifactManager(dcRepo, datastore, testStoragePrefix, mockScope.NewTestScope()) + artifactResponse, err := artifactManager.UpdateArtifact(ctx, request) + assert.Error(t, err) + assert.Equal(t, codes.NotFound, status.Code(err)) + assert.Nil(t, artifactResponse) + }) + + t.Run("Artifact update failed", func(t *testing.T) { + ctx := context.Background() + datastore := createInmemoryDataStore(t, mockScope.NewTestScope()) + mockArtifactModel := getExpectedArtifactModel(ctx, t, datastore, expectedArtifact) + + dcRepo := newMockDataCatalogRepo() + dcRepo.MockArtifactRepo.On("Get", + mock.MatchedBy(func(ctx context.Context) bool { return true }), + mock.MatchedBy(func(artifactKey models.ArtifactKey) bool { + return artifactKey.ArtifactID == expectedArtifact.Id && + artifactKey.DatasetProject == expectedArtifact.Dataset.Project && + artifactKey.DatasetDomain == expectedArtifact.Dataset.Domain && + artifactKey.DatasetName == expectedArtifact.Dataset.Name && + artifactKey.DatasetVersion == expectedArtifact.Dataset.Version + })).Return(mockArtifactModel, nil) + + dcRepo.MockArtifactRepo.On("Update", mock.Anything, mock.Anything).Return(errors.NewDataCatalogError(codes.Internal, "failed")) + + request := &datacatalog.UpdateArtifactRequest{ + Dataset: expectedDataset.Id, + QueryHandle: &datacatalog.UpdateArtifactRequest_ArtifactId{ + ArtifactId: expectedArtifact.Id, + }, + Data: []*datacatalog.ArtifactData{ + { + Name: "data1", + Value: getTestStringLiteralWithValue("value11"), + }, + { + Name: "data3", + Value: getTestStringLiteralWithValue("value3"), + }, + }, + } + + artifactManager := NewArtifactManager(dcRepo, datastore, testStoragePrefix, mockScope.NewTestScope()) + artifactResponse, err := artifactManager.UpdateArtifact(ctx, request) + assert.Error(t, err) + assert.Equal(t, codes.Internal, status.Code(err)) + assert.Nil(t, artifactResponse) + }) + t.Run("Missing artifact ID", func(t *testing.T) { ctx := context.Background() datastore := createInmemoryDataStore(t, mockScope.NewTestScope()) @@ -935,3 +1022,243 @@ func TestUpdateArtifact(t *testing.T) { assert.Nil(t, artifactResponse) }) } + +func TestDeleteArtifact(t *testing.T) { + ctx := context.Background() + datastore := createInmemoryDataStore(t, mockScope.NewTestScope()) + testStoragePrefix, err := datastore.ConstructReference(ctx, datastore.GetBaseContainerFQN(ctx), "test") + assert.NoError(t, err) + + expectedDataset := getTestDataset() + expectedArtifact := getTestArtifact() + expectedTag := getTestTag() + + t.Run("Delete by ID", func(t *testing.T) { + ctx := context.Background() + datastore := createInmemoryDataStore(t, mockScope.NewTestScope()) + mockArtifactModel := getExpectedArtifactModel(ctx, t, datastore, expectedArtifact) + + dcRepo := newMockDataCatalogRepo() + dcRepo.MockArtifactRepo.On("Get", + mock.MatchedBy(func(ctx context.Context) bool { return true }), + mock.MatchedBy(func(artifactKey models.ArtifactKey) bool { + return artifactKey.ArtifactID == expectedArtifact.Id && + artifactKey.DatasetProject == expectedArtifact.Dataset.Project && + artifactKey.DatasetDomain == expectedArtifact.Dataset.Domain && + artifactKey.DatasetName == expectedArtifact.Dataset.Name && + artifactKey.DatasetVersion == expectedArtifact.Dataset.Version + })).Return(mockArtifactModel, nil) + + dcRepo.MockArtifactRepo.On("Delete", + mock.MatchedBy(func(ctx context.Context) bool { return true }), + mock.MatchedBy(func(artifact models.Artifact) bool { + return artifact.ArtifactID == expectedArtifact.Id && + artifact.DatasetProject == expectedArtifact.Dataset.Project && + artifact.DatasetDomain == expectedArtifact.Dataset.Domain && + artifact.DatasetName == expectedArtifact.Dataset.Name && + artifact.DatasetVersion == expectedArtifact.Dataset.Version + })).Return(nil) + + request := &datacatalog.DeleteArtifactRequest{ + Dataset: expectedDataset.Id, + QueryHandle: &datacatalog.DeleteArtifactRequest_ArtifactId{ + ArtifactId: expectedArtifact.Id, + }, + } + + artifactManager := NewArtifactManager(dcRepo, datastore, testStoragePrefix, mockScope.NewTestScope()) + artifactResponse, err := artifactManager.DeleteArtifact(ctx, request) + assert.NoError(t, err) + assert.NotNil(t, artifactResponse) + + // check that the datastore no longer has artifactData available + dataRef, err := getExpectedDatastoreLocationFromName(ctx, datastore, testStoragePrefix, expectedArtifact, "data1") + assert.NoError(t, err) + var value core.Literal + err = datastore.ReadProtobuf(ctx, dataRef, &value) + assert.Error(t, err) + assert.True(t, stdErrors.Is(err, os.ErrNotExist)) + }) + + t.Run("Delete by artifact tag", func(t *testing.T) { + ctx := context.Background() + datastore := createInmemoryDataStore(t, mockScope.NewTestScope()) + mockArtifactModel := getExpectedArtifactModel(ctx, t, datastore, expectedArtifact) + + dcRepo := newMockDataCatalogRepo() + dcRepo.MockArtifactRepo.On("Delete", + mock.MatchedBy(func(ctx context.Context) bool { return true }), + mock.MatchedBy(func(artifact models.Artifact) bool { + return artifact.ArtifactID == expectedArtifact.Id && + artifact.DatasetProject == expectedArtifact.Dataset.Project && + artifact.DatasetDomain == expectedArtifact.Dataset.Domain && + artifact.DatasetName == expectedArtifact.Dataset.Name && + artifact.DatasetVersion == expectedArtifact.Dataset.Version + })).Return(nil) + + dcRepo.MockTagRepo.On("Get", mock.Anything, + mock.MatchedBy(func(tag models.TagKey) bool { + return tag.TagName == expectedTag.TagName && + tag.DatasetProject == expectedTag.DatasetProject && + tag.DatasetDomain == expectedTag.DatasetDomain && + tag.DatasetVersion == expectedTag.DatasetVersion && + tag.DatasetName == expectedTag.DatasetName + })).Return(models.Tag{ + TagKey: models.TagKey{ + DatasetProject: expectedTag.DatasetProject, + DatasetDomain: expectedTag.DatasetDomain, + DatasetName: expectedTag.DatasetName, + DatasetVersion: expectedTag.DatasetVersion, + TagName: expectedTag.TagName, + }, + DatasetUUID: expectedTag.DatasetUUID, + Artifact: mockArtifactModel, + ArtifactID: mockArtifactModel.ArtifactID, + }, nil) + + request := &datacatalog.DeleteArtifactRequest{ + Dataset: expectedDataset.Id, + QueryHandle: &datacatalog.DeleteArtifactRequest_TagName{ + TagName: expectedTag.TagName, + }, + } + + artifactManager := NewArtifactManager(dcRepo, datastore, testStoragePrefix, mockScope.NewTestScope()) + artifactResponse, err := artifactManager.DeleteArtifact(ctx, request) + assert.NoError(t, err) + assert.NotNil(t, artifactResponse) + + // check that the datastore no longer has artifactData available + dataRef, err := getExpectedDatastoreLocationFromName(ctx, datastore, testStoragePrefix, expectedArtifact, "data1") + assert.NoError(t, err) + var value core.Literal + err = datastore.ReadProtobuf(ctx, dataRef, &value) + assert.Error(t, err) + assert.True(t, stdErrors.Is(err, os.ErrNotExist)) + }) + + t.Run("Artifact not found", func(t *testing.T) { + ctx := context.Background() + datastore := createInmemoryDataStore(t, mockScope.NewTestScope()) + + dcRepo := newMockDataCatalogRepo() + dcRepo.MockArtifactRepo.On("Get", mock.Anything, mock.Anything).Return(models.Artifact{}, repoErrors.GetMissingEntityError("Artifact", &datacatalog.Artifact{ + Dataset: expectedDataset.Id, + Id: expectedArtifact.Id, + })) + + request := &datacatalog.DeleteArtifactRequest{ + Dataset: expectedDataset.Id, + QueryHandle: &datacatalog.DeleteArtifactRequest_ArtifactId{ + ArtifactId: expectedArtifact.Id, + }, + } + + artifactManager := NewArtifactManager(dcRepo, datastore, testStoragePrefix, mockScope.NewTestScope()) + artifactResponse, err := artifactManager.DeleteArtifact(ctx, request) + assert.Error(t, err) + assert.Equal(t, codes.NotFound, status.Code(err)) + assert.Nil(t, artifactResponse) + }) + + t.Run("Artifact not found during delete", func(t *testing.T) { + ctx := context.Background() + datastore := createInmemoryDataStore(t, mockScope.NewTestScope()) + mockArtifactModel := getExpectedArtifactModel(ctx, t, datastore, expectedArtifact) + + dcRepo := newMockDataCatalogRepo() + dcRepo.MockArtifactRepo.On("Get", + mock.MatchedBy(func(ctx context.Context) bool { return true }), + mock.MatchedBy(func(artifactKey models.ArtifactKey) bool { + return artifactKey.ArtifactID == expectedArtifact.Id && + artifactKey.DatasetProject == expectedArtifact.Dataset.Project && + artifactKey.DatasetDomain == expectedArtifact.Dataset.Domain && + artifactKey.DatasetName == expectedArtifact.Dataset.Name && + artifactKey.DatasetVersion == expectedArtifact.Dataset.Version + })).Return(mockArtifactModel, nil) + dcRepo.MockArtifactRepo.On("Delete", mock.Anything, mock.Anything).Return(repoErrors.GetMissingEntityError("Artifact", &datacatalog.Artifact{ + Dataset: expectedDataset.Id, + Id: expectedArtifact.Id, + })) + + request := &datacatalog.DeleteArtifactRequest{ + Dataset: expectedDataset.Id, + QueryHandle: &datacatalog.DeleteArtifactRequest_ArtifactId{ + ArtifactId: expectedArtifact.Id, + }, + } + + artifactManager := NewArtifactManager(dcRepo, datastore, testStoragePrefix, mockScope.NewTestScope()) + artifactResponse, err := artifactManager.DeleteArtifact(ctx, request) + assert.Error(t, err) + assert.Equal(t, codes.NotFound, status.Code(err)) + assert.Nil(t, artifactResponse) + }) + + t.Run("Artifact delete failed", func(t *testing.T) { + ctx := context.Background() + datastore := createInmemoryDataStore(t, mockScope.NewTestScope()) + mockArtifactModel := getExpectedArtifactModel(ctx, t, datastore, expectedArtifact) + + dcRepo := newMockDataCatalogRepo() + dcRepo.MockArtifactRepo.On("Get", + mock.MatchedBy(func(ctx context.Context) bool { return true }), + mock.MatchedBy(func(artifactKey models.ArtifactKey) bool { + return artifactKey.ArtifactID == expectedArtifact.Id && + artifactKey.DatasetProject == expectedArtifact.Dataset.Project && + artifactKey.DatasetDomain == expectedArtifact.Dataset.Domain && + artifactKey.DatasetName == expectedArtifact.Dataset.Name && + artifactKey.DatasetVersion == expectedArtifact.Dataset.Version + })).Return(mockArtifactModel, nil) + dcRepo.MockArtifactRepo.On("Delete", mock.Anything, mock.Anything).Return(errors.NewDataCatalogError(codes.Internal, "failed")) + + request := &datacatalog.DeleteArtifactRequest{ + Dataset: expectedDataset.Id, + QueryHandle: &datacatalog.DeleteArtifactRequest_ArtifactId{ + ArtifactId: expectedArtifact.Id, + }, + } + + artifactManager := NewArtifactManager(dcRepo, datastore, testStoragePrefix, mockScope.NewTestScope()) + artifactResponse, err := artifactManager.DeleteArtifact(ctx, request) + assert.Error(t, err) + assert.Equal(t, codes.Internal, status.Code(err)) + assert.Nil(t, artifactResponse) + }) + + t.Run("Missing artifact ID", func(t *testing.T) { + ctx := context.Background() + datastore := createInmemoryDataStore(t, mockScope.NewTestScope()) + + dcRepo := newMockDataCatalogRepo() + + request := &datacatalog.DeleteArtifactRequest{ + Dataset: expectedDataset.Id, + QueryHandle: &datacatalog.DeleteArtifactRequest_ArtifactId{}, + } + + artifactManager := NewArtifactManager(dcRepo, datastore, testStoragePrefix, mockScope.NewTestScope()) + artifactResponse, err := artifactManager.DeleteArtifact(ctx, request) + assert.Error(t, err) + assert.Equal(t, codes.InvalidArgument, status.Code(err)) + assert.Nil(t, artifactResponse) + }) + + t.Run("Missing artifact tag", func(t *testing.T) { + ctx := context.Background() + datastore := createInmemoryDataStore(t, mockScope.NewTestScope()) + + dcRepo := newMockDataCatalogRepo() + + request := &datacatalog.DeleteArtifactRequest{ + Dataset: expectedDataset.Id, + QueryHandle: &datacatalog.DeleteArtifactRequest_TagName{}, + } + + artifactManager := NewArtifactManager(dcRepo, datastore, testStoragePrefix, mockScope.NewTestScope()) + artifactResponse, err := artifactManager.DeleteArtifact(ctx, request) + assert.Error(t, err) + assert.Equal(t, codes.InvalidArgument, status.Code(err)) + assert.Nil(t, artifactResponse) + }) +} diff --git a/datacatalog/pkg/manager/impl/reservation_manager.go b/datacatalog/pkg/manager/impl/reservation_manager.go index 394ad5a55d..65e0cc25c2 100644 --- a/datacatalog/pkg/manager/impl/reservation_manager.go +++ b/datacatalog/pkg/manager/impl/reservation_manager.go @@ -5,6 +5,7 @@ import ( "time" "github.com/flyteorg/flyte/datacatalog/pkg/errors" + "github.com/flyteorg/flyte/datacatalog/pkg/manager/impl/validators" "github.com/flyteorg/flyte/datacatalog/pkg/manager/interfaces" "github.com/flyteorg/flyte/datacatalog/pkg/repositories" repo_errors "github.com/flyteorg/flyte/datacatalog/pkg/repositories/errors" @@ -36,7 +37,7 @@ type reservationManager struct { systemMetrics reservationMetrics } -// Creates a new reservation manager with the specified properties +// NewReservationManager creates a new reservation manager with the specified properties func NewReservationManager( repo repositories.RepositoryInterface, heartbeatGracePeriodMultiplier time.Duration, @@ -85,9 +86,15 @@ func NewReservationManager( } } -// Attempt to acquire a reservation for the specified artifact. If there is not active reservation, successfully -// acquire it. If you are the owner of the active reservation, extend it. If another owner, return the existing reservation. +// GetOrExtendReservation attempts to acquire a reservation for the specified artifact. If there is no active +// reservation, successfully acquire it. If you are the owner of the active reservation, extend it. If another owner, +// return the existing reservation. func (r *reservationManager) GetOrExtendReservation(ctx context.Context, request *datacatalog.GetOrExtendReservationRequest) (*datacatalog.GetOrExtendReservationResponse, error) { + if err := validators.ValidateGetOrExtendReservationRequest(request); err != nil { + r.systemMetrics.acquireReservationFailure.Inc(ctx) + return nil, err + } + reservationID := request.ReservationId // Use minimum of maxHeartbeatInterval and requested heartbeat interval @@ -186,8 +193,12 @@ func (r *reservationManager) tryAcquireReservation(ctx context.Context, reservat return reservation, nil } -// Release an active reservation with the specified owner. If one does not exist, gracefully return. +// ReleaseReservation releases an active reservation with the specified owner. If one does not exist, gracefully return. func (r *reservationManager) ReleaseReservation(ctx context.Context, request *datacatalog.ReleaseReservationRequest) (*datacatalog.ReleaseReservationResponse, error) { + if err := validators.ValidateReleaseReservationRequest(request); err != nil { + return nil, err + } + repo := r.repo.ReservationRepo() reservationKey := transformers.FromReservationID(request.ReservationId) diff --git a/datacatalog/pkg/manager/impl/reservation_manager_test.go b/datacatalog/pkg/manager/impl/reservation_manager_test.go index 0dd7408792..fc883600cf 100644 --- a/datacatalog/pkg/manager/impl/reservation_manager_test.go +++ b/datacatalog/pkg/manager/impl/reservation_manager_test.go @@ -356,7 +356,15 @@ func getDatacatalogRepo() mocks.DataCatalogRepo { } } -func setUpReservationRepoGet(dcRepo *mocks.DataCatalogRepo, prevExpiresAt time.Time) { +func setUpReservationRepoGet(dcRepo *mocks.DataCatalogRepo, prevExpiresAt time.Time, tagNames ...string) { + if len(tagNames) == 0 { + tagNames = []string{tagName} + } + tags := make(map[string]bool) + for _, tn := range tagNames { + tags[tn] = true + } + dcRepo.MockReservationRepo.On("Get", mock.MatchedBy(func(ctx context.Context) bool { return true }), mock.MatchedBy(func(key models.ReservationKey) bool { @@ -364,7 +372,7 @@ func setUpReservationRepoGet(dcRepo *mocks.DataCatalogRepo, prevExpiresAt time.T key.DatasetDomain == datasetID.Domain && key.DatasetVersion == datasetID.Version && key.DatasetName == datasetID.Name && - key.TagName == tagName + tags[key.TagName] })).Return( models.Reservation{ ReservationKey: getReservationKey(), diff --git a/datacatalog/pkg/manager/impl/validators/artifact_validator.go b/datacatalog/pkg/manager/impl/validators/artifact_validator.go index d4721e1597..4244c2b0ac 100644 --- a/datacatalog/pkg/manager/impl/validators/artifact_validator.go +++ b/datacatalog/pkg/manager/impl/validators/artifact_validator.go @@ -138,3 +138,35 @@ func ValidateUpdateArtifactRequest(request *datacatalog.UpdateArtifactRequest) e return nil } + +func ValidateDeleteArtifactRequest(request *datacatalog.DeleteArtifactRequest) error { + if request.QueryHandle == nil { + return NewMissingArgumentError(fmt.Sprintf("one of %s/%s", artifactID, tagName)) + } + + switch request.QueryHandle.(type) { + case *datacatalog.DeleteArtifactRequest_ArtifactId: + if request.Dataset != nil { + err := ValidateDatasetID(request.Dataset) + if err != nil { + return err + } + } + + if err := ValidateEmptyStringField(request.GetArtifactId(), artifactID); err != nil { + return err + } + case *datacatalog.DeleteArtifactRequest_TagName: + if err := ValidateDatasetID(request.Dataset); err != nil { + return err + } + + if err := ValidateEmptyStringField(request.GetTagName(), tagName); err != nil { + return err + } + default: + return NewInvalidArgumentError("QueryHandle", "invalid type") + } + + return nil +} diff --git a/datacatalog/pkg/manager/impl/validators/reservation_validator.go b/datacatalog/pkg/manager/impl/validators/reservation_validator.go new file mode 100644 index 0000000000..150751bd21 --- /dev/null +++ b/datacatalog/pkg/manager/impl/validators/reservation_validator.go @@ -0,0 +1,45 @@ +package validators + +import ( + "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/datacatalog" +) + +func ValidateGetOrExtendReservationRequest(request *datacatalog.GetOrExtendReservationRequest) error { + if request.GetReservationId() == nil { + return NewMissingArgumentError("reservationID") + } + if err := ValidateDatasetID(request.GetReservationId().GetDatasetId()); err != nil { + return err + } + if err := ValidateEmptyStringField(request.GetReservationId().GetTagName(), tagName); err != nil { + return err + } + + if err := ValidateEmptyStringField(request.GetOwnerId(), "ownerID"); err != nil { + return err + } + + if request.GetHeartbeatInterval() == nil { + return NewMissingArgumentError("heartbeatInterval") + } + + return nil +} + +func ValidateReleaseReservationRequest(request *datacatalog.ReleaseReservationRequest) error { + if request.GetReservationId() == nil { + return NewMissingArgumentError("reservationID") + } + if err := ValidateDatasetID(request.GetReservationId().GetDatasetId()); err != nil { + return err + } + if err := ValidateEmptyStringField(request.GetReservationId().GetTagName(), tagName); err != nil { + return err + } + + if err := ValidateEmptyStringField(request.GetOwnerId(), "ownerID"); err != nil { + return err + } + + return nil +} diff --git a/datacatalog/pkg/manager/interfaces/artifact.go b/datacatalog/pkg/manager/interfaces/artifact.go index f370369602..c527c55233 100644 --- a/datacatalog/pkg/manager/interfaces/artifact.go +++ b/datacatalog/pkg/manager/interfaces/artifact.go @@ -13,4 +13,5 @@ type ArtifactManager interface { GetArtifact(ctx context.Context, request *idl_datacatalog.GetArtifactRequest) (*idl_datacatalog.GetArtifactResponse, error) ListArtifacts(ctx context.Context, request *idl_datacatalog.ListArtifactsRequest) (*idl_datacatalog.ListArtifactsResponse, error) UpdateArtifact(ctx context.Context, request *idl_datacatalog.UpdateArtifactRequest) (*idl_datacatalog.UpdateArtifactResponse, error) + DeleteArtifact(ctx context.Context, request *idl_datacatalog.DeleteArtifactRequest) (*idl_datacatalog.DeleteArtifactResponse, error) } diff --git a/datacatalog/pkg/manager/mocks/artifact_manager.go b/datacatalog/pkg/manager/mocks/artifact_manager.go index d249aac1a2..a4d2b5ba30 100644 --- a/datacatalog/pkg/manager/mocks/artifact_manager.go +++ b/datacatalog/pkg/manager/mocks/artifact_manager.go @@ -56,6 +56,47 @@ func (_m *ArtifactManager) CreateArtifact(ctx context.Context, request *datacata return r0, r1 } +type ArtifactManager_DeleteArtifact struct { + *mock.Call +} + +func (_m ArtifactManager_DeleteArtifact) Return(_a0 *datacatalog.DeleteArtifactResponse, _a1 error) *ArtifactManager_DeleteArtifact { + return &ArtifactManager_DeleteArtifact{Call: _m.Call.Return(_a0, _a1)} +} + +func (_m *ArtifactManager) OnDeleteArtifact(ctx context.Context, request *datacatalog.DeleteArtifactRequest) *ArtifactManager_DeleteArtifact { + c_call := _m.On("DeleteArtifact", ctx, request) + return &ArtifactManager_DeleteArtifact{Call: c_call} +} + +func (_m *ArtifactManager) OnDeleteArtifactMatch(matchers ...interface{}) *ArtifactManager_DeleteArtifact { + c_call := _m.On("DeleteArtifact", matchers...) + return &ArtifactManager_DeleteArtifact{Call: c_call} +} + +// DeleteArtifact provides a mock function with given fields: ctx, request +func (_m *ArtifactManager) DeleteArtifact(ctx context.Context, request *datacatalog.DeleteArtifactRequest) (*datacatalog.DeleteArtifactResponse, error) { + ret := _m.Called(ctx, request) + + var r0 *datacatalog.DeleteArtifactResponse + if rf, ok := ret.Get(0).(func(context.Context, *datacatalog.DeleteArtifactRequest) *datacatalog.DeleteArtifactResponse); ok { + r0 = rf(ctx, request) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*datacatalog.DeleteArtifactResponse) + } + } + + var r1 error + if rf, ok := ret.Get(1).(func(context.Context, *datacatalog.DeleteArtifactRequest) error); ok { + r1 = rf(ctx, request) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + type ArtifactManager_GetArtifact struct { *mock.Call } diff --git a/datacatalog/pkg/repositories/gormimpl/artifact.go b/datacatalog/pkg/repositories/gormimpl/artifact.go index b5089123d1..9b578b55d6 100644 --- a/datacatalog/pkg/repositories/gormimpl/artifact.go +++ b/datacatalog/pkg/repositories/gormimpl/artifact.go @@ -180,3 +180,71 @@ func (h *artifactRepo) Update(ctx context.Context, artifact models.Artifact) err return nil } + +// Delete deletes the given artifact and its associated ArtifactData from the database. +func (h *artifactRepo) Delete(ctx context.Context, artifact models.Artifact) error { + timer := h.repoMetrics.DeleteDuration.Start(ctx) + defer timer.Stop() + + tx := h.db.Begin() + defer func() { + if r := recover(); r != nil { + tx.Rollback() + } + }() + + if err := tx.Error; err != nil { + return err + } + + // delete all data related to artifact from database + if err := tx.Where(&models.ArtifactData{ArtifactKey: artifact.ArtifactKey}).Delete(&models.ArtifactData{}).Error; err != nil { + tx.Rollback() + return h.errorTransformer.ToDataCatalogError(err) + } + + if err := tx.Where(&models.Tag{ArtifactID: artifact.ArtifactID, DatasetUUID: artifact.DatasetUUID}).Delete(&models.Tag{}).Error; err != nil { + tx.Rollback() + return h.errorTransformer.ToDataCatalogError(err) + } + + if err := tx.Where(&models.Partition{ArtifactID: artifact.ArtifactID, DatasetUUID: artifact.DatasetUUID}).Delete(&models.Partition{}).Error; err != nil { + tx.Rollback() + return h.errorTransformer.ToDataCatalogError(err) + } + + if err := tx.Where(&models.Dataset{DatasetKey: models.DatasetKey{ + Project: artifact.DatasetProject, + Domain: artifact.DatasetDomain, + Name: artifact.DatasetName, + Version: artifact.DatasetVersion, + UUID: artifact.DatasetUUID, + }}).Delete(&models.Dataset{}).Error; err != nil { + tx.Rollback() + return h.errorTransformer.ToDataCatalogError(err) + } + + // delete actual artifact from database + if res := tx.Delete(&artifact); res.Error != nil { + tx.Rollback() + return h.errorTransformer.ToDataCatalogError(res.Error) + } else if res.RowsAffected == 0 { + // no rows affected --> artifact not found + tx.Rollback() + return errors.GetMissingEntityError(string(common.Artifact), &datacatalog.Artifact{ + Dataset: &datacatalog.DatasetID{ + Project: artifact.DatasetProject, + Domain: artifact.DatasetDomain, + Name: artifact.DatasetName, + Version: artifact.DatasetVersion, + }, + Id: artifact.ArtifactID, + }) + } + + if err := tx.Commit().Error; err != nil { + return h.errorTransformer.ToDataCatalogError(err) + } + + return nil +} diff --git a/datacatalog/pkg/repositories/gormimpl/artifact_test.go b/datacatalog/pkg/repositories/gormimpl/artifact_test.go index 18b819d45f..fcd47ca362 100644 --- a/datacatalog/pkg/repositories/gormimpl/artifact_test.go +++ b/datacatalog/pkg/repositories/gormimpl/artifact_test.go @@ -409,6 +409,26 @@ func TestUpdateArtifactDoesNotExist(t *testing.T) { GlobalMock := mocket.Catcher.Reset() GlobalMock.Logging = true + artifactUpdated := false + GlobalMock.NewMock().WithQuery(`UPDATE "artifacts" SET "updated_at"=$1,"artifact_id"=$2 WHERE "artifact_id" = $3`). + WithRowsNum(0). + WithCallback(func(s string, values []driver.NamedValue) { + artifactUpdated = true + }) + artifactDataDeleted := false + GlobalMock.NewMock(). + WithQuery(`DELETE FROM "artifact_data" WHERE "artifact_data"."artifact_id" = $1 AND name NOT IN ($2,$3)`). + WithRowsNum(0). + WithCallback(func(s string, values []driver.NamedValue) { + artifactDataDeleted = true + }) + artifactDataUpserted := false + GlobalMock.NewMock().WithQuery(`INSERT INTO "artifact_data" ("created_at","updated_at","deleted_at","dataset_project","dataset_name","dataset_domain","dataset_version","artifact_id","name","location") VALUES ($1,$2,$3,$4,$5,$6,$7,$8,$9,$10),($11,$12,$13,$14,$15,$16,$17,$18,$19,$20) ON CONFLICT DO NOTHING`). + WithRowsNum(1). + WithCallback(func(s string, values []driver.NamedValue) { + artifactDataUpserted = true + }) + updateInput := models.Artifact{ ArtifactKey: models.ArtifactKey{ ArtifactID: artifact.ArtifactID, @@ -431,6 +451,9 @@ func TestUpdateArtifactDoesNotExist(t *testing.T) { dcErr, ok := err.(apiErrors.DataCatalogError) assert.True(t, ok) assert.Equal(t, dcErr.Code(), codes.NotFound) + assert.True(t, artifactUpdated) + assert.False(t, artifactDataDeleted) + assert.False(t, artifactDataUpserted) } func TestUpdateArtifactError(t *testing.T) { @@ -558,3 +581,263 @@ func TestUpdateArtifactError(t *testing.T) { assert.True(t, artifactDataDeleted) }) } + +func TestDeleteArtifact(t *testing.T) { + ctx := context.Background() + artifact := getTestArtifact() + + GlobalMock := mocket.Catcher.Reset() + GlobalMock.Logging = true + + artifactDataDeleted := false + GlobalMock.NewMock(). + WithQuery(`DELETE FROM "artifact_data" WHERE "artifact_data"."dataset_project" = $1 AND "artifact_data"."dataset_name" = $2 AND "artifact_data"."dataset_domain" = $3 AND "artifact_data"."dataset_version" = $4 AND "artifact_data"."artifact_id" = $5`). + WithRowsNum(1). + WithCallback(func(s string, values []driver.NamedValue) { + artifactDataDeleted = true + }) + tagsDeleted := false + GlobalMock.NewMock(). + WithQuery(`DELETE FROM "tags" WHERE "tags"."artifact_id" = $1 AND "tags"."dataset_uuid" = $2`). + WithRowsNum(1). + WithCallback(func(s string, values []driver.NamedValue) { + tagsDeleted = true + }) + partitionsDeleted := false + GlobalMock.NewMock(). + WithQuery(`DELETE FROM "partitions" WHERE "partitions"."dataset_uuid" = $1 AND "partitions"."artifact_id" = $2`). + WithRowsNum(1). + WithCallback(func(s string, values []driver.NamedValue) { + partitionsDeleted = true + }) + artifactDeleted := false + GlobalMock.NewMock().WithQuery(`DELETE FROM "artifacts" WHERE ("artifacts"."dataset_project","artifacts"."dataset_name","artifacts"."dataset_domain","artifacts"."dataset_version","artifacts"."artifact_id") IN (($1,$2,$3,$4,$5))`). + WithRowsNum(1). + WithCallback(func(s string, values []driver.NamedValue) { + artifactDeleted = true + }) + + artifactRepo := NewArtifactRepo(utils.GetDbForTest(t), errors.NewPostgresErrorTransformer(), promutils.NewTestScope()) + err := artifactRepo.Delete(ctx, artifact) + assert.NoError(t, err) + assert.True(t, artifactDataDeleted) + assert.True(t, tagsDeleted) + assert.True(t, partitionsDeleted) + assert.True(t, artifactDeleted) +} + +func TestDeleteArtifactDoesNotExist(t *testing.T) { + ctx := context.Background() + artifact := getTestArtifact() + + GlobalMock := mocket.Catcher.Reset() + GlobalMock.Logging = true + + artifactDataDeleted := false + GlobalMock.NewMock(). + WithQuery(`DELETE FROM "artifact_data" WHERE "artifact_data"."dataset_project" = $1 AND "artifact_data"."dataset_name" = $2 AND "artifact_data"."dataset_domain" = $3 AND "artifact_data"."dataset_version" = $4 AND "artifact_data"."artifact_id" = $5`). + WithRowsNum(0). + WithCallback(func(s string, values []driver.NamedValue) { + artifactDataDeleted = true + }) + tagsDeleted := false + GlobalMock.NewMock(). + WithQuery(`DELETE FROM "tags" WHERE "tags"."artifact_id" = $1 AND "tags"."dataset_uuid" = $2`). + WithRowsNum(0). + WithCallback(func(s string, values []driver.NamedValue) { + tagsDeleted = true + }) + partitionsDeleted := false + GlobalMock.NewMock(). + WithQuery(`DELETE FROM "partitions" WHERE "partitions"."dataset_uuid" = $1 AND "partitions"."artifact_id" = $2`). + WithRowsNum(0). + WithCallback(func(s string, values []driver.NamedValue) { + partitionsDeleted = true + }) + artifactDeleted := false + GlobalMock.NewMock().WithQuery(`DELETE FROM "artifacts" WHERE ("artifacts"."dataset_project","artifacts"."dataset_name","artifacts"."dataset_domain","artifacts"."dataset_version","artifacts"."artifact_id") IN (($1,$2,$3,$4,$5))`). + WithRowsNum(0). + WithCallback(func(s string, values []driver.NamedValue) { + artifactDeleted = true + }) + + artifactRepo := NewArtifactRepo(utils.GetDbForTest(t), errors.NewPostgresErrorTransformer(), promutils.NewTestScope()) + err := artifactRepo.Delete(ctx, artifact) + assert.Error(t, err) + dcErr, ok := err.(apiErrors.DataCatalogError) + assert.True(t, ok) + assert.Equal(t, dcErr.Code(), codes.NotFound) + assert.True(t, artifactDataDeleted) + assert.True(t, tagsDeleted) + assert.True(t, partitionsDeleted) + assert.True(t, artifactDeleted) +} + +func TestDeleteArtifactError(t *testing.T) { + artifact := getTestArtifact() + + t.Run("ArtifactDataDelete", func(t *testing.T) { + ctx := context.Background() + + GlobalMock := mocket.Catcher.Reset() + GlobalMock.Logging = true + + GlobalMock.NewMock(). + WithQuery(`DELETE FROM "artifact_data" WHERE "artifact_data"."dataset_project" = $1 AND "artifact_data"."dataset_name" = $2 AND "artifact_data"."dataset_domain" = $3 AND "artifact_data"."dataset_version" = $4 AND "artifact_data"."artifact_id" = $5`). + WithExecException() + tagsDeleted := false + GlobalMock.NewMock(). + WithQuery(`DELETE FROM "tags" WHERE "tags"."artifact_id" = $1 AND "tags"."dataset_uuid" = $2`). + WithRowsNum(0). + WithCallback(func(s string, values []driver.NamedValue) { + tagsDeleted = true + }) + partitionsDeleted := false + GlobalMock.NewMock(). + WithQuery(`DELETE FROM "partitions" WHERE "partitions"."dataset_uuid" = $1 AND "partitions"."artifact_id" = $2`). + WithRowsNum(0). + WithCallback(func(s string, values []driver.NamedValue) { + partitionsDeleted = true + }) + artifactDeleted := false + GlobalMock.NewMock().WithQuery(`DELETE FROM "artifacts" WHERE ("artifacts"."dataset_project","artifacts"."dataset_name","artifacts"."dataset_domain","artifacts"."dataset_version","artifacts"."artifact_id") IN (($1,$2,$3,$4,$5))`). + WithRowsNum(1). + WithCallback(func(s string, values []driver.NamedValue) { + artifactDeleted = true + }) + + artifactRepo := NewArtifactRepo(utils.GetDbForTest(t), errors.NewPostgresErrorTransformer(), promutils.NewTestScope()) + err := artifactRepo.Delete(ctx, artifact) + assert.Error(t, err) + dcErr, ok := err.(apiErrors.DataCatalogError) + assert.True(t, ok) + assert.Equal(t, dcErr.Code(), codes.Internal) + assert.False(t, tagsDeleted) + assert.False(t, partitionsDeleted) + assert.False(t, artifactDeleted) + }) + + t.Run("TagsDelete", func(t *testing.T) { + ctx := context.Background() + + GlobalMock := mocket.Catcher.Reset() + GlobalMock.Logging = true + + artifactDataDeleted := false + GlobalMock.NewMock(). + WithQuery(`DELETE FROM "artifact_data" WHERE "artifact_data"."dataset_project" = $1 AND "artifact_data"."dataset_name" = $2 AND "artifact_data"."dataset_domain" = $3 AND "artifact_data"."dataset_version" = $4 AND "artifact_data"."artifact_id" = $5`). + WithRowsNum(0). + WithCallback(func(s string, values []driver.NamedValue) { + artifactDataDeleted = true + }) + GlobalMock.NewMock(). + WithQuery(`DELETE FROM "tags" WHERE "tags"."artifact_id" = $1 AND "tags"."dataset_uuid" = $2`). + WithExecException() + partitionsDeleted := false + GlobalMock.NewMock(). + WithQuery(`DELETE FROM "partitions" WHERE "partitions"."dataset_uuid" = $1 AND "partitions"."artifact_id" = $2`). + WithRowsNum(0). + WithCallback(func(s string, values []driver.NamedValue) { + partitionsDeleted = true + }) + artifactDeleted := false + GlobalMock.NewMock().WithQuery(`DELETE FROM "artifacts" WHERE ("artifacts"."dataset_project","artifacts"."dataset_name","artifacts"."dataset_domain","artifacts"."dataset_version","artifacts"."artifact_id") IN (($1,$2,$3,$4,$5))`). + WithRowsNum(1). + WithCallback(func(s string, values []driver.NamedValue) { + artifactDeleted = true + }) + + artifactRepo := NewArtifactRepo(utils.GetDbForTest(t), errors.NewPostgresErrorTransformer(), promutils.NewTestScope()) + err := artifactRepo.Delete(ctx, artifact) + assert.Error(t, err) + dcErr, ok := err.(apiErrors.DataCatalogError) + assert.True(t, ok) + assert.Equal(t, dcErr.Code(), codes.Internal) + assert.True(t, artifactDataDeleted) + assert.False(t, partitionsDeleted) + assert.False(t, artifactDeleted) + }) + + t.Run("PartitionsDelete", func(t *testing.T) { + ctx := context.Background() + + GlobalMock := mocket.Catcher.Reset() + GlobalMock.Logging = true + + artifactDataDeleted := false + GlobalMock.NewMock(). + WithQuery(`DELETE FROM "artifact_data" WHERE "artifact_data"."dataset_project" = $1 AND "artifact_data"."dataset_name" = $2 AND "artifact_data"."dataset_domain" = $3 AND "artifact_data"."dataset_version" = $4 AND "artifact_data"."artifact_id" = $5`). + WithRowsNum(0). + WithCallback(func(s string, values []driver.NamedValue) { + artifactDataDeleted = true + }) + tagsDeleted := false + GlobalMock.NewMock(). + WithQuery(`DELETE FROM "tags" WHERE "tags"."artifact_id" = $1 AND "tags"."dataset_uuid" = $2`). + WithRowsNum(0). + WithCallback(func(s string, values []driver.NamedValue) { + tagsDeleted = true + }) + GlobalMock.NewMock(). + WithQuery(`DELETE FROM "partitions" WHERE "partitions"."dataset_uuid" = $1 AND "partitions"."artifact_id" = $2`). + WithRowsNum(0). + WithExecException() + artifactDeleted := false + GlobalMock.NewMock().WithQuery(`DELETE FROM "artifacts" WHERE ("artifacts"."dataset_project","artifacts"."dataset_name","artifacts"."dataset_domain","artifacts"."dataset_version","artifacts"."artifact_id") IN (($1,$2,$3,$4,$5))`). + WithRowsNum(1). + WithCallback(func(s string, values []driver.NamedValue) { + artifactDeleted = true + }) + + artifactRepo := NewArtifactRepo(utils.GetDbForTest(t), errors.NewPostgresErrorTransformer(), promutils.NewTestScope()) + err := artifactRepo.Delete(ctx, artifact) + assert.Error(t, err) + dcErr, ok := err.(apiErrors.DataCatalogError) + assert.True(t, ok) + assert.Equal(t, dcErr.Code(), codes.Internal) + assert.True(t, artifactDataDeleted) + assert.True(t, tagsDeleted) + assert.False(t, artifactDeleted) + }) + + t.Run("ArtifactDelete", func(t *testing.T) { + ctx := context.Background() + + GlobalMock := mocket.Catcher.Reset() + GlobalMock.Logging = true + + artifactDataDeleted := false + GlobalMock.NewMock(). + WithQuery(`DELETE FROM "artifact_data" WHERE "artifact_data"."dataset_project" = $1 AND "artifact_data"."dataset_name" = $2 AND "artifact_data"."dataset_domain" = $3 AND "artifact_data"."dataset_version" = $4 AND "artifact_data"."artifact_id" = $5`). + WithRowsNum(0). + WithCallback(func(s string, values []driver.NamedValue) { + artifactDataDeleted = true + }) + tagsDeleted := false + GlobalMock.NewMock(). + WithQuery(`DELETE FROM "tags" WHERE "tags"."artifact_id" = $1 AND "tags"."dataset_uuid" = $2`). + WithRowsNum(0). + WithCallback(func(s string, values []driver.NamedValue) { + tagsDeleted = true + }) + partitionsDeleted := false + GlobalMock.NewMock(). + WithQuery(`DELETE FROM "partitions" WHERE "partitions"."dataset_uuid" = $1 AND "partitions"."artifact_id" = $2`). + WithRowsNum(0). + WithCallback(func(s string, values []driver.NamedValue) { + partitionsDeleted = true + }) + GlobalMock.NewMock().WithQuery(`DELETE FROM "artifacts" WHERE ("artifacts"."dataset_project","artifacts"."dataset_name","artifacts"."dataset_domain","artifacts"."dataset_version","artifacts"."artifact_id") IN (($1,$2,$3,$4,$5))`). + WithExecException() + + artifactRepo := NewArtifactRepo(utils.GetDbForTest(t), errors.NewPostgresErrorTransformer(), promutils.NewTestScope()) + err := artifactRepo.Delete(ctx, artifact) + assert.Error(t, err) + dcErr, ok := err.(apiErrors.DataCatalogError) + assert.True(t, ok) + assert.Equal(t, dcErr.Code(), codes.Internal) + assert.True(t, artifactDataDeleted) + assert.True(t, tagsDeleted) + assert.True(t, partitionsDeleted) + }) +} diff --git a/datacatalog/pkg/repositories/interfaces/artifact_repo.go b/datacatalog/pkg/repositories/interfaces/artifact_repo.go index ae56b99d7f..1d815ffd7f 100644 --- a/datacatalog/pkg/repositories/interfaces/artifact_repo.go +++ b/datacatalog/pkg/repositories/interfaces/artifact_repo.go @@ -13,4 +13,5 @@ type ArtifactRepo interface { Get(ctx context.Context, in models.ArtifactKey) (models.Artifact, error) List(ctx context.Context, datasetKey models.DatasetKey, in models.ListModelsInput) ([]models.Artifact, error) Update(ctx context.Context, artifact models.Artifact) error + Delete(ctx context.Context, artifact models.Artifact) error } diff --git a/datacatalog/pkg/repositories/mocks/artifact_repo.go b/datacatalog/pkg/repositories/mocks/artifact_repo.go index bf939f3e4b..14af4dd782 100644 --- a/datacatalog/pkg/repositories/mocks/artifact_repo.go +++ b/datacatalog/pkg/repositories/mocks/artifact_repo.go @@ -47,6 +47,38 @@ func (_m *ArtifactRepo) Create(ctx context.Context, in models.Artifact) error { return r0 } +type ArtifactRepo_Delete struct { + *mock.Call +} + +func (_m ArtifactRepo_Delete) Return(_a0 error) *ArtifactRepo_Delete { + return &ArtifactRepo_Delete{Call: _m.Call.Return(_a0)} +} + +func (_m *ArtifactRepo) OnDelete(ctx context.Context, artifact models.Artifact) *ArtifactRepo_Delete { + c_call := _m.On("Delete", ctx, artifact) + return &ArtifactRepo_Delete{Call: c_call} +} + +func (_m *ArtifactRepo) OnDeleteMatch(matchers ...interface{}) *ArtifactRepo_Delete { + c_call := _m.On("Delete", matchers...) + return &ArtifactRepo_Delete{Call: c_call} +} + +// Delete provides a mock function with given fields: ctx, artifact +func (_m *ArtifactRepo) Delete(ctx context.Context, artifact models.Artifact) error { + ret := _m.Called(ctx, artifact) + + var r0 error + if rf, ok := ret.Get(0).(func(context.Context, models.Artifact) error); ok { + r0 = rf(ctx, artifact) + } else { + r0 = ret.Error(0) + } + + return r0 +} + type ArtifactRepo_Get struct { *mock.Call } diff --git a/datacatalog/pkg/rpc/datacatalogservice/service.go b/datacatalog/pkg/rpc/datacatalogservice/service.go index 605ea85e8f..163c24b92c 100644 --- a/datacatalog/pkg/rpc/datacatalogservice/service.go +++ b/datacatalog/pkg/rpc/datacatalogservice/service.go @@ -67,6 +67,10 @@ func (s *DataCatalogService) UpdateArtifact(ctx context.Context, request *catalo return s.ArtifactManager.UpdateArtifact(ctx, request) } +func (s *DataCatalogService) DeleteArtifact(ctx context.Context, request *catalog.DeleteArtifactRequest) (*catalog.DeleteArtifactResponse, error) { + return s.ArtifactManager.DeleteArtifact(ctx, request) +} + func (s *DataCatalogService) GetOrExtendReservation(ctx context.Context, request *catalog.GetOrExtendReservationRequest) (*catalog.GetOrExtendReservationResponse, error) { return s.ReservationManager.GetOrExtendReservation(ctx, request) } diff --git a/flyteadmin/pkg/manager/impl/cache_manager.go b/flyteadmin/pkg/manager/impl/cache_manager.go new file mode 100644 index 0000000000..6306e26118 --- /dev/null +++ b/flyteadmin/pkg/manager/impl/cache_manager.go @@ -0,0 +1,290 @@ +package impl + +import ( + "context" + "time" + + "github.com/golang/protobuf/proto" + "github.com/prometheus/client_golang/prometheus" + + "github.com/flyteorg/flyte/flyteadmin/pkg/manager/impl/util" + "github.com/flyteorg/flyte/flyteadmin/pkg/manager/impl/validation" + "github.com/flyteorg/flyte/flyteadmin/pkg/manager/interfaces" + repoInterfaces "github.com/flyteorg/flyte/flyteadmin/pkg/repositories/interfaces" + "github.com/flyteorg/flyte/flyteadmin/pkg/repositories/models" + "github.com/flyteorg/flyte/flyteadmin/pkg/repositories/transformers" + runtimeInterfaces "github.com/flyteorg/flyte/flyteadmin/pkg/runtime/interfaces" + "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin" + "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/core" + "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/service" + "github.com/flyteorg/flyte/flyteplugins/go/tasks/pluginmachinery/catalog" + "github.com/flyteorg/flyte/flytestdlib/catalog/datacatalog" + "github.com/flyteorg/flyte/flytestdlib/logger" + "github.com/flyteorg/flyte/flytestdlib/promutils" +) + +var ( + _ interfaces.CacheInterface = &CacheManager{} +) + +const ( + reservationHeartbeat = 10 * time.Second +) + +type cacheMetrics struct { + Scope promutils.Scope + CacheEvictionTime promutils.StopWatch + CacheEvictionSuccess prometheus.Counter + CacheEvictionFailures prometheus.Counter +} + +type CacheManager struct { + db repoInterfaces.Repository + config runtimeInterfaces.Configuration + catalogClient catalog.Client + metrics cacheMetrics +} + +func (m *CacheManager) EvictTaskExecutionCache(ctx context.Context, req service.EvictTaskExecutionCacheRequest) (*service.EvictCacheResponse, error) { + if err := validation.ValidateTaskExecutionIdentifier(req.GetTaskExecutionId()); err != nil { + logger.Debugf(ctx, "EvictTaskExecutionCache request [%+v] failed validation with err: %v", req, err) + return nil, err + } + + ctx = getTaskExecutionContext(ctx, req.TaskExecutionId) + var evictionErrors []*core.CacheEvictionError + + taskExecutionModel, err := util.GetTaskExecutionModel(ctx, m.db, req.TaskExecutionId) + if err != nil { + logger.Debugf(ctx, "Failed to get task execution model for task execution ID %+v: %v", req.TaskExecutionId, err) + return nil, err + } + + nodeExecutionModel, err := util.GetNodeExecutionModel(ctx, m.db, req.TaskExecutionId.NodeExecutionId) + if err != nil { + logger.Debugf(ctx, "Failed to get node execution model for node execution ID %+v: %v", req.TaskExecutionId.NodeExecutionId, err) + return nil, err + } + + nodeExecution, err := transformers.FromNodeExecutionModel(*nodeExecutionModel, transformers.DefaultExecutionTransformerOptions) + if err != nil { + logger.Debugf(ctx, "Failed to transform node execution model %+v: %v", + nodeExecutionModel.NodeExecutionKey, err) + m.metrics.CacheEvictionFailures.Inc() + evictionErrors = append(evictionErrors, &core.CacheEvictionError{ + NodeExecutionId: &core.NodeExecutionIdentifier{ + NodeId: nodeExecutionModel.NodeID, + ExecutionId: &core.WorkflowExecutionIdentifier{ + Project: nodeExecutionModel.NodeExecutionKey.ExecutionKey.Project, + Domain: nodeExecutionModel.NodeExecutionKey.ExecutionKey.Domain, + Name: nodeExecutionModel.NodeExecutionKey.ExecutionKey.Name, + }, + }, + Code: core.CacheEvictionError_INTERNAL, + Message: "Internal error", + }) + return &service.EvictCacheResponse{ + Errors: &core.CacheEvictionErrorList{Errors: evictionErrors}, + }, nil + } + + taskExecution, err := transformers.FromTaskExecutionModel(*taskExecutionModel, transformers.DefaultExecutionTransformerOptions) + if err != nil { + logger.Debugf(ctx, "Failed to transform task execution model %+v: %v", + taskExecutionModel.TaskExecutionKey, err) + m.metrics.CacheEvictionFailures.Inc() + evictionErrors = append(evictionErrors, &core.CacheEvictionError{ + NodeExecutionId: nodeExecution.Id, + Source: &core.CacheEvictionError_TaskExecutionId{ + TaskExecutionId: taskExecution.Id, + }, + Code: core.CacheEvictionError_INTERNAL, + Message: "Internal error", + }) + return &service.EvictCacheResponse{ + Errors: &core.CacheEvictionErrorList{Errors: evictionErrors}, + }, nil + } + + logger.Debugf(ctx, "Starting to evict cache for execution %+v of task %+v", req.TaskExecutionId, req.TaskExecutionId.TaskId) + + metadata, ok := nodeExecution.GetClosure().GetTargetMetadata().(*admin.NodeExecutionClosure_TaskNodeMetadata) + if !ok { + logger.Debugf(ctx, "Node execution %+v did not contain task node metadata, skipping cache eviction", + nodeExecution.Id) + m.metrics.CacheEvictionFailures.Inc() + evictionErrors = append(evictionErrors, &core.CacheEvictionError{ + NodeExecutionId: nodeExecution.Id, + Source: &core.CacheEvictionError_WorkflowExecutionId{ + WorkflowExecutionId: nodeExecution.Id.ExecutionId, + }, + Code: core.CacheEvictionError_INTERNAL, + Message: "Internal error", + }) + return &service.EvictCacheResponse{ + Errors: &core.CacheEvictionErrorList{Errors: evictionErrors}, + }, nil + } + + evictionErrors = m.evictTaskNodeExecutionCache(ctx, *nodeExecutionModel, nodeExecution, taskExecution, metadata.TaskNodeMetadata, evictionErrors) + logger.Debugf(ctx, "Finished evicting cache for execution %+v of task %+v", req.TaskExecutionId, req.TaskExecutionId.TaskId) + return &service.EvictCacheResponse{ + Errors: &core.CacheEvictionErrorList{Errors: evictionErrors}, + }, nil +} + +func (m *CacheManager) evictTaskNodeExecutionCache(ctx context.Context, nodeExecutionModel models.NodeExecution, + nodeExecution *admin.NodeExecution, taskExecution *admin.TaskExecution, + taskNodeMetadata *admin.TaskNodeMetadata, errors []*core.CacheEvictionError) (evictionErrors []*core.CacheEvictionError) { + evictionErrors = errors + if taskNodeMetadata == nil || (taskNodeMetadata.GetCacheStatus() != core.CatalogCacheStatus_CACHE_HIT && + taskNodeMetadata.GetCacheStatus() != core.CatalogCacheStatus_CACHE_POPULATED && + taskNodeMetadata.GetCacheStatus() != core.CatalogCacheStatus_CACHE_EVICTED) { + logger.Debugf(ctx, "Node execution %+v did not contain cached data, skipping cache eviction", + nodeExecution.Id) + return evictionErrors + } + + datasetID := datacatalog.IdentifierToDatasetID(taskNodeMetadata.GetCatalogKey().GetDatasetId()) + artifactTag := taskNodeMetadata.GetCatalogKey().GetArtifactTag().GetName() + artifactID := taskNodeMetadata.GetCatalogKey().GetArtifactTag().GetArtifactId() + ownerID := taskExecution.GetClosure().GetMetadata().GetGeneratedName() + + reservation, err := m.catalogClient.GetOrExtendReservationByArtifactTag(ctx, datasetID, artifactTag, ownerID, + reservationHeartbeat) + if err != nil { + logger.Warnf(ctx, + "Failed to acquire reservation for artifact with tag %q for dataset %+v of node execution %+v: %v", + artifactTag, datasetID, nodeExecution.Id, err) + m.metrics.CacheEvictionFailures.Inc() + evictionErrors = append(evictionErrors, &core.CacheEvictionError{ + NodeExecutionId: nodeExecution.Id, + Source: &core.CacheEvictionError_TaskExecutionId{ + TaskExecutionId: taskExecution.Id, + }, + Code: core.CacheEvictionError_RESERVATION_NOT_ACQUIRED, + Message: "Failed to acquire reservation for artifact", + }) + return evictionErrors + } + + defer func() { + if err := m.catalogClient.ReleaseReservationByArtifactTag(ctx, datasetID, artifactTag, ownerID); err != nil { + logger.Warnf(ctx, "Failed to release reservation for artifact of node execution %+v", + nodeExecution.Id) + evictionErrors = append(evictionErrors, &core.CacheEvictionError{ + NodeExecutionId: nodeExecution.Id, + Source: &core.CacheEvictionError_TaskExecutionId{ + TaskExecutionId: taskExecution.Id, + }, + Code: core.CacheEvictionError_RESERVATION_NOT_RELEASED, + Message: "Failed to release reservation for artifact", + }) + } + }() + + if len(reservation.GetOwnerId()) == 0 { + logger.Debugf(ctx, "Received empty owner ID for artifact of node execution %+v, assuming NOOP catalog, skipping cache eviction", + nodeExecution.Id) + return evictionErrors + } else if reservation.GetOwnerId() != ownerID { + logger.Debugf(ctx, "Artifact of node execution %+v is reserved by different owner, cannot evict cache", + nodeExecution.Id) + m.metrics.CacheEvictionFailures.Inc() + evictionErrors = append(evictionErrors, &core.CacheEvictionError{ + NodeExecutionId: nodeExecution.Id, + Source: &core.CacheEvictionError_TaskExecutionId{ + TaskExecutionId: taskExecution.Id, + }, + Code: core.CacheEvictionError_RESERVATION_NOT_ACQUIRED, + Message: "Artifact is reserved by different owner", + }) + return evictionErrors + } + + if err := m.catalogClient.DeleteByArtifactID(ctx, datasetID, artifactID); err != nil { + if catalog.IsNotFound(err) { + logger.Debugf(ctx, "Artifact with ID %s for dataset %+v of node execution %+v not found, assuming already deleted by previous eviction. Skipping...", + artifactID, datasetID, nodeExecution.Id) + } else { + logger.Warnf(ctx, "Failed to delete artifact with ID %s for dataset %+v of node execution %+v: %v", + artifactID, datasetID, nodeExecution.Id, err) + m.metrics.CacheEvictionFailures.Inc() + evictionErrors = append(evictionErrors, &core.CacheEvictionError{ + NodeExecutionId: nodeExecution.Id, + Source: &core.CacheEvictionError_TaskExecutionId{ + TaskExecutionId: taskExecution.Id, + }, + Code: core.CacheEvictionError_ARTIFACT_DELETE_FAILED, + Message: "Failed to delete artifact", + }) + return evictionErrors + } + } + + cacheEvictedStatus := core.CatalogCacheStatus_CACHE_EVICTED.String() + nodeExecutionModel.CacheStatus = &cacheEvictedStatus + + taskNodeMetadata.CacheStatus = core.CatalogCacheStatus_CACHE_EVICTED + nodeExecution.Closure.TargetMetadata = &admin.NodeExecutionClosure_TaskNodeMetadata{ + TaskNodeMetadata: taskNodeMetadata, + } + + marshaledClosure, err := proto.Marshal(nodeExecution.Closure) + if err != nil { + logger.Warnf(ctx, "Failed to marshal updated closure for node execution %+v: err", + nodeExecution.Id, err) + m.metrics.CacheEvictionFailures.Inc() + evictionErrors = append(evictionErrors, &core.CacheEvictionError{ + NodeExecutionId: nodeExecution.Id, + Source: &core.CacheEvictionError_TaskExecutionId{ + TaskExecutionId: taskExecution.Id, + }, + Code: core.CacheEvictionError_INTERNAL, + Message: "Failed to marshal updated node execution closure", + }) + return evictionErrors + } + + nodeExecutionModel.Closure = marshaledClosure + + if err := m.db.NodeExecutionRepo().Update(ctx, &nodeExecutionModel); err != nil { + logger.Warnf(ctx, "Failed to update node execution model %+v after deleting artifact: %v", + nodeExecution.Id, err) + m.metrics.CacheEvictionFailures.Inc() + evictionErrors = append(evictionErrors, &core.CacheEvictionError{ + NodeExecutionId: nodeExecution.Id, + Source: &core.CacheEvictionError_TaskExecutionId{ + TaskExecutionId: taskExecution.Id, + }, + Code: core.CacheEvictionError_DATABASE_UPDATE_FAILED, + Message: "Failed to update node execution", + }) + return evictionErrors + } + + logger.Debugf(ctx, "Successfully evicted cache for task node execution %+v", nodeExecution.Id) + m.metrics.CacheEvictionSuccess.Inc() + + return evictionErrors +} + +func NewCacheManager(db repoInterfaces.Repository, config runtimeInterfaces.Configuration, catalogClient catalog.Client, + scope promutils.Scope) interfaces.CacheInterface { + metrics := cacheMetrics{ + Scope: scope, + CacheEvictionTime: scope.MustNewStopWatch("cache_eviction_duration", + "duration taken for evicting the cache of a node execution", time.Millisecond), + CacheEvictionSuccess: scope.MustNewCounter("cache_eviction_success", + "number of times cache eviction for a node execution succeeded"), + CacheEvictionFailures: scope.MustNewCounter("cache_eviction_failures", + "number of times cache eviction for a node execution failed"), + } + + return &CacheManager{ + db: db, + config: config, + catalogClient: catalogClient, + metrics: metrics, + } +} diff --git a/flyteadmin/pkg/manager/impl/cache_manager_test.go b/flyteadmin/pkg/manager/impl/cache_manager_test.go new file mode 100644 index 0000000000..954119de97 --- /dev/null +++ b/flyteadmin/pkg/manager/impl/cache_manager_test.go @@ -0,0 +1,1750 @@ +package impl + +import ( + "context" + "fmt" + "testing" + + "github.com/golang/protobuf/proto" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/mock" + "github.com/stretchr/testify/require" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/status" + + flyteAdminErrors "github.com/flyteorg/flyte/flyteadmin/pkg/errors" + "github.com/flyteorg/flyte/flyteadmin/pkg/repositories/interfaces" + repositoryMocks "github.com/flyteorg/flyte/flyteadmin/pkg/repositories/mocks" + "github.com/flyteorg/flyte/flyteadmin/pkg/repositories/models" + "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/admin" + "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/core" + "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/datacatalog" + "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/event" + "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/service" + pluginCatalog "github.com/flyteorg/flyte/flyteplugins/go/tasks/pluginmachinery/catalog" + "github.com/flyteorg/flyte/flyteplugins/go/tasks/pluginmachinery/catalog/mocks" + "github.com/flyteorg/flyte/flytestdlib/catalog" + "github.com/flyteorg/flyte/flytestdlib/promutils" +) + +func serializeNodeExecutionMetadata(t *testing.T, nodeExecutionMetadata *admin.NodeExecutionMetaData) []byte { + t.Helper() + marshalled, err := proto.Marshal(nodeExecutionMetadata) + require.NoError(t, err) + return marshalled +} + +func serializeNodeExecutionClosure(t *testing.T, nodeExecutionClosure *admin.NodeExecutionClosure) []byte { + t.Helper() + marshalled, err := proto.Marshal(nodeExecutionClosure) + require.NoError(t, err) + return marshalled +} + +func serializeTaskExecutionClosure(t *testing.T, taskExecutionClosure *admin.TaskExecutionClosure) []byte { + t.Helper() + marshalled, err := proto.Marshal(taskExecutionClosure) + require.NoError(t, err) + return marshalled +} + +func ptr[T any](val T) *T { + return &val +} + +func setupCacheEvictionMockRepositories(t *testing.T, repository interfaces.Repository, nodeExecutionModels []models.NodeExecution, + taskExecutionModels map[string][]models.TaskExecution) map[string]int { + + repository.NodeExecutionRepo().(*repositoryMocks.MockNodeExecutionRepo).SetGetCallback( + func(ctx context.Context, input interfaces.NodeExecutionResource) (models.NodeExecution, error) { + for _, nodeExecution := range nodeExecutionModels { + if nodeExecution.NodeID == input.NodeExecutionIdentifier.NodeId { + return nodeExecution, nil + } + } + return models.NodeExecution{}, flyteAdminErrors.NewFlyteAdminErrorf(codes.NotFound, "entry not found") + }) + + repository.NodeExecutionRepo().(*repositoryMocks.MockNodeExecutionRepo).SetListCallback( + func(ctx context.Context, input interfaces.ListResourceInput) (interfaces.NodeExecutionCollectionOutput, error) { + var parentID uint + for _, filter := range input.InlineFilters { + if filter.GetField() == "parent_id" { + query, err := filter.GetGormJoinTableQueryExpr("") + require.NoError(t, err) + var ok bool + parentID, ok = query.Args.(uint) + require.True(t, ok) + } + } + if parentID == 0 { + return interfaces.NodeExecutionCollectionOutput{NodeExecutions: nodeExecutionModels}, nil + } + for _, nodeExecution := range nodeExecutionModels { + if nodeExecution.ID == parentID { + return interfaces.NodeExecutionCollectionOutput{NodeExecutions: nodeExecution.ChildNodeExecutions}, nil + } + } + return interfaces.NodeExecutionCollectionOutput{}, flyteAdminErrors.NewFlyteAdminErrorf(codes.NotFound, "entry not found") + }) + + updatedNodeExecutions := make(map[string]int) + + repository.NodeExecutionRepo().(*repositoryMocks.MockNodeExecutionRepo).SetUpdateCallback( + func(ctx context.Context, nodeExecution *models.NodeExecution) error { + assert.Equal(t, core.CatalogCacheStatus_CACHE_EVICTED.String(), *nodeExecution.CacheStatus) + + var closure admin.NodeExecutionClosure + err := proto.Unmarshal(nodeExecution.Closure, &closure) + require.NoError(t, err) + md, ok := closure.TargetMetadata.(*admin.NodeExecutionClosure_TaskNodeMetadata) + require.True(t, ok) + require.NotNil(t, md.TaskNodeMetadata) + assert.Equal(t, core.CatalogCacheStatus_CACHE_EVICTED, md.TaskNodeMetadata.CacheStatus) + + updatedNodeExecutions[nodeExecution.NodeID]++ + + for i := range nodeExecutionModels { + if nodeExecutionModels[i].ID == nodeExecution.ID { + nodeExecutionModels[i] = *nodeExecution + break + } + } + return nil + }) + + repository.TaskExecutionRepo().(*repositoryMocks.MockTaskExecutionRepo).SetListCallback( + func(ctx context.Context, input interfaces.ListResourceInput) (interfaces.TaskExecutionCollectionOutput, error) { + var nodeID string + for _, filter := range input.InlineFilters { + if filter.GetField() == "node_id" { + query, err := filter.GetGormJoinTableQueryExpr("") + require.NoError(t, err) + var ok bool + nodeID, ok = query.Args.(string) + require.True(t, ok) + } + } + require.NotEmpty(t, nodeID) + taskExecutions, ok := taskExecutionModels[nodeID] + require.True(t, ok) + return interfaces.TaskExecutionCollectionOutput{TaskExecutions: taskExecutions}, nil + }) + + repository.TaskExecutionRepo().(*repositoryMocks.MockTaskExecutionRepo).SetGetCallback( + func(ctx context.Context, input interfaces.GetTaskExecutionInput) (models.TaskExecution, error) { + for nodeID := range taskExecutionModels { + if nodeID == input.TaskExecutionID.NodeExecutionId.NodeId { + return taskExecutionModels[nodeID][0], nil + } + } + return models.TaskExecution{}, flyteAdminErrors.NewFlyteAdminErrorf(codes.NotFound, "entry not found") + }) + + return updatedNodeExecutions +} + +func setupCacheEvictionCatalogClient(t *testing.T, catalogClient *mocks.Client, artifactTags []*core.CatalogArtifactTag, + taskExecutionModels map[string][]models.TaskExecution) map[string]int { + for nodeID := range taskExecutionModels { + for _, taskExecution := range taskExecutionModels[nodeID] { + require.NotNil(t, taskExecution.RetryAttempt) + ownerID := fmt.Sprintf("%s-%s-%d", executionIdentifier.Name, nodeID, *taskExecution.RetryAttempt) + for _, artifactTag := range artifactTags { + catalogClient.On("GetOrExtendReservationByArtifactTag", mock.Anything, mock.Anything, + artifactTag.GetName(), ownerID, mock.Anything).Return(&datacatalog.Reservation{OwnerId: ownerID}, nil) + catalogClient.On("ReleaseReservationByArtifactTag", mock.Anything, mock.Anything, + artifactTag.GetName(), ownerID).Return(nil) + } + } + } + + deletedArtifactIDs := make(map[string]int) + for _, artifactTag := range artifactTags { + catalogClient.On("DeleteByArtifactID", mock.Anything, mock.Anything, artifactTag.GetArtifactId()). + Run(func(args mock.Arguments) { + deletedArtifactIDs[args.Get(2).(string)] = deletedArtifactIDs[args.Get(2).(string)] + 1 + }). + Return(nil) + } + + return deletedArtifactIDs +} + +func TestEvictTaskExecutionCache(t *testing.T) { + t.Run("task", func(t *testing.T) { + repository := repositoryMocks.NewMockRepository() + catalogClient := &mocks.Client{} + mockConfig := getMockExecutionsConfigProvider() + + artifactTags := []*core.CatalogArtifactTag{ + { + ArtifactId: "0285ddb9-ddfb-4835-bc22-80e1bdf7f560", + Name: "flyte_cached-G3ACyxqY0U3sEf99tLMta5vuLCOk7j9O7MStxubzxYM", + }, + } + + nodeExecutionModels := []models.NodeExecution{ + { + BaseModel: models.BaseModel{ + ID: 1, + }, + NodeExecutionKey: models.NodeExecutionKey{ + ExecutionKey: models.ExecutionKey{ + Project: executionIdentifier.Project, + Domain: executionIdentifier.Domain, + Name: executionIdentifier.Name, + }, + NodeID: "n0", + }, + Phase: core.NodeExecution_SUCCEEDED.String(), + NodeExecutionMetadata: serializeNodeExecutionMetadata(t, &admin.NodeExecutionMetaData{ + IsParentNode: false, + IsDynamic: false, + SpecNodeId: "n0", + }), + Closure: serializeNodeExecutionClosure(t, &admin.NodeExecutionClosure{ + TargetMetadata: &admin.NodeExecutionClosure_TaskNodeMetadata{ + TaskNodeMetadata: &admin.TaskNodeMetadata{ + CacheStatus: core.CatalogCacheStatus_CACHE_POPULATED, + CatalogKey: &core.CatalogMetadata{ + DatasetId: &core.Identifier{ + ResourceType: core.ResourceType_DATASET, + Project: executionIdentifier.Project, + Domain: executionIdentifier.Domain, + Name: "flyte_task-test.evict.execution_cache_single_task", + Version: "version", + }, + ArtifactTag: artifactTags[0], + }, + }, + }, + }), + }, + } + + taskExecutionModels := map[string][]models.TaskExecution{ + "n0": { + { + BaseModel: models.BaseModel{ + ID: 1, + }, + TaskExecutionKey: models.TaskExecutionKey{ + TaskKey: models.TaskKey{ + Project: executionIdentifier.Project, + Domain: executionIdentifier.Domain, + Name: "flyte_task-test.evict.execution_cache", + Version: "version", + }, + NodeExecutionKey: models.NodeExecutionKey{ + ExecutionKey: models.ExecutionKey{ + Project: executionIdentifier.Project, + Domain: executionIdentifier.Domain, + Name: executionIdentifier.Name, + }, + NodeID: "n0", + }, + RetryAttempt: ptr[uint32](0), + }, + Phase: core.NodeExecution_SUCCEEDED.String(), + Closure: serializeTaskExecutionClosure(t, &admin.TaskExecutionClosure{ + Metadata: &event.TaskExecutionMetadata{ + GeneratedName: "name-n0-0", + }, + }), + }, + }, + } + + updatedNodeExecutions := setupCacheEvictionMockRepositories(t, repository, nodeExecutionModels, taskExecutionModels) + deletedArtifactIDs := setupCacheEvictionCatalogClient(t, catalogClient, artifactTags, taskExecutionModels) + + cacheManager := NewCacheManager(repository, mockConfig, catalogClient, promutils.NewTestScope()) + request := service.EvictTaskExecutionCacheRequest{ + TaskExecutionId: &core.TaskExecutionIdentifier{ + TaskId: &core.Identifier{ + ResourceType: core.ResourceType_TASK, + Project: executionIdentifier.Project, + Domain: executionIdentifier.Domain, + Name: executionIdentifier.Name, + Version: version, + }, + NodeExecutionId: &core.NodeExecutionIdentifier{ + ExecutionId: &executionIdentifier, + NodeId: "n0", + }, + RetryAttempt: uint32(0), + }, + } + resp, err := cacheManager.EvictTaskExecutionCache(context.Background(), request) + require.NoError(t, err) + require.NotNil(t, resp) + assert.Empty(t, resp.GetErrors().GetErrors()) + + for nodeID := range taskExecutionModels { + assert.Contains(t, updatedNodeExecutions, nodeID) + } + assert.Len(t, updatedNodeExecutions, len(taskExecutionModels)) + + for _, artifactTag := range artifactTags { + assert.Equal(t, 1, deletedArtifactIDs[artifactTag.GetArtifactId()]) + } + assert.Len(t, deletedArtifactIDs, len(artifactTags)) + }) + + t.Run("noop catalog", func(t *testing.T) { + repository := repositoryMocks.NewMockRepository() + catalogClient := catalog.NOOPCatalog{} + mockConfig := getMockExecutionsConfigProvider() + + artifactTags := []*core.CatalogArtifactTag{ + { + ArtifactId: "0285ddb9-ddfb-4835-bc22-80e1bdf7f560", + Name: "flyte_cached-G3ACyxqY0U3sEf99tLMta5vuLCOk7j9O7MStxubzxYM", + }, + } + + nodeExecutionModels := []models.NodeExecution{ + { + BaseModel: models.BaseModel{ + ID: 1, + }, + NodeExecutionKey: models.NodeExecutionKey{ + ExecutionKey: models.ExecutionKey{ + Project: executionIdentifier.Project, + Domain: executionIdentifier.Domain, + Name: executionIdentifier.Name, + }, + NodeID: "n0", + }, + Phase: core.NodeExecution_SUCCEEDED.String(), + NodeExecutionMetadata: serializeNodeExecutionMetadata(t, &admin.NodeExecutionMetaData{ + IsParentNode: false, + IsDynamic: false, + SpecNodeId: "n0", + }), + Closure: serializeNodeExecutionClosure(t, &admin.NodeExecutionClosure{ + TargetMetadata: &admin.NodeExecutionClosure_TaskNodeMetadata{ + TaskNodeMetadata: &admin.TaskNodeMetadata{ + CacheStatus: core.CatalogCacheStatus_CACHE_POPULATED, + CatalogKey: &core.CatalogMetadata{ + DatasetId: &core.Identifier{ + ResourceType: core.ResourceType_DATASET, + Project: executionIdentifier.Project, + Domain: executionIdentifier.Domain, + Name: "flyte_task-test.evict.execution_cache_single_task", + Version: "version", + }, + ArtifactTag: artifactTags[0], + }, + }, + }, + }), + }, + } + + taskExecutionModels := map[string][]models.TaskExecution{ + "n0": { + { + BaseModel: models.BaseModel{ + ID: 1, + }, + TaskExecutionKey: models.TaskExecutionKey{ + TaskKey: models.TaskKey{ + Project: executionIdentifier.Project, + Domain: executionIdentifier.Domain, + Name: "flyte_task-test.evict.execution_cache", + Version: "version", + }, + NodeExecutionKey: models.NodeExecutionKey{ + ExecutionKey: models.ExecutionKey{ + Project: executionIdentifier.Project, + Domain: executionIdentifier.Domain, + Name: executionIdentifier.Name, + }, + NodeID: "n0", + }, + RetryAttempt: ptr[uint32](0), + }, + Phase: core.NodeExecution_SUCCEEDED.String(), + Closure: serializeTaskExecutionClosure(t, &admin.TaskExecutionClosure{ + Metadata: &event.TaskExecutionMetadata{ + GeneratedName: "name-n0-0", + }, + }), + }, + }, + } + + updatedNodeExecutions := setupCacheEvictionMockRepositories(t, repository, nodeExecutionModels, taskExecutionModels) + + cacheManager := NewCacheManager(repository, mockConfig, catalogClient, promutils.NewTestScope()) + request := service.EvictTaskExecutionCacheRequest{ + TaskExecutionId: &core.TaskExecutionIdentifier{ + TaskId: &core.Identifier{ + ResourceType: core.ResourceType_TASK, + Project: executionIdentifier.Project, + Domain: executionIdentifier.Domain, + Name: executionIdentifier.Name, + Version: version, + }, + NodeExecutionId: &core.NodeExecutionIdentifier{ + ExecutionId: &executionIdentifier, + NodeId: "n0", + }, + RetryAttempt: uint32(0), + }, + } + resp, err := cacheManager.EvictTaskExecutionCache(context.Background(), request) + require.NoError(t, err) + require.NotNil(t, resp) + assert.Empty(t, resp.GetErrors().GetErrors()) + + assert.Empty(t, updatedNodeExecutions) + }) + + t.Run("unknown task execution", func(t *testing.T) { + repository := repositoryMocks.NewMockRepository() + catalogClient := &mocks.Client{} + mockConfig := getMockExecutionsConfigProvider() + + repository.TaskExecutionRepo().(*repositoryMocks.MockTaskExecutionRepo).SetGetCallback( + func(ctx context.Context, input interfaces.GetTaskExecutionInput) (models.TaskExecution, error) { + return models.TaskExecution{}, flyteAdminErrors.NewFlyteAdminErrorf(codes.NotFound, "entry not found") + }) + + cacheManager := NewCacheManager(repository, mockConfig, catalogClient, promutils.NewTestScope()) + request := service.EvictTaskExecutionCacheRequest{ + TaskExecutionId: &core.TaskExecutionIdentifier{ + TaskId: &core.Identifier{ + ResourceType: core.ResourceType_TASK, + Project: executionIdentifier.Project, + Domain: executionIdentifier.Domain, + Name: executionIdentifier.Name, + Version: version, + }, + NodeExecutionId: &core.NodeExecutionIdentifier{ + ExecutionId: &executionIdentifier, + NodeId: "n0", + }, + RetryAttempt: uint32(0), + }, + } + resp, err := cacheManager.EvictTaskExecutionCache(context.Background(), request) + assert.Error(t, err) + assert.True(t, pluginCatalog.IsNotFound(err)) + assert.Nil(t, resp) + }) + + t.Run("unknown node execution", func(t *testing.T) { + repository := repositoryMocks.NewMockRepository() + catalogClient := &mocks.Client{} + mockConfig := getMockExecutionsConfigProvider() + + taskExecutionModel := models.TaskExecution{ + BaseModel: models.BaseModel{ + ID: 1, + }, + TaskExecutionKey: models.TaskExecutionKey{ + TaskKey: models.TaskKey{ + Project: executionIdentifier.Project, + Domain: executionIdentifier.Domain, + Name: "flyte_task-test.evict.execution_cache", + Version: "version", + }, + NodeExecutionKey: models.NodeExecutionKey{ + ExecutionKey: models.ExecutionKey{ + Project: executionIdentifier.Project, + Domain: executionIdentifier.Domain, + Name: executionIdentifier.Name, + }, + NodeID: "n0", + }, + RetryAttempt: ptr[uint32](0), + }, + Phase: core.NodeExecution_SUCCEEDED.String(), + Closure: serializeTaskExecutionClosure(t, &admin.TaskExecutionClosure{ + Metadata: &event.TaskExecutionMetadata{ + GeneratedName: "name-n0-0", + }, + }), + } + + repository.TaskExecutionRepo().(*repositoryMocks.MockTaskExecutionRepo).SetGetCallback( + func(ctx context.Context, input interfaces.GetTaskExecutionInput) (models.TaskExecution, error) { + assert.EqualValues(t, executionIdentifier, *input.TaskExecutionID.NodeExecutionId.ExecutionId) + assert.Equal(t, taskExecutionModel.TaskExecutionKey.NodeID, input.TaskExecutionID.NodeExecutionId.NodeId) + return taskExecutionModel, nil + }) + + repository.NodeExecutionRepo().(*repositoryMocks.MockNodeExecutionRepo).SetGetCallback( + func(ctx context.Context, input interfaces.NodeExecutionResource) (models.NodeExecution, error) { + return models.NodeExecution{}, flyteAdminErrors.NewFlyteAdminErrorf(codes.NotFound, "entry not found") + }) + + cacheManager := NewCacheManager(repository, mockConfig, catalogClient, promutils.NewTestScope()) + request := service.EvictTaskExecutionCacheRequest{ + TaskExecutionId: &core.TaskExecutionIdentifier{ + TaskId: &core.Identifier{ + ResourceType: core.ResourceType_TASK, + Project: executionIdentifier.Project, + Domain: executionIdentifier.Domain, + Name: executionIdentifier.Name, + Version: version, + }, + NodeExecutionId: &core.NodeExecutionIdentifier{ + ExecutionId: &executionIdentifier, + NodeId: "n0", + }, + RetryAttempt: uint32(0), + }, + } + resp, err := cacheManager.EvictTaskExecutionCache(context.Background(), request) + assert.Error(t, err) + assert.True(t, pluginCatalog.IsNotFound(err)) + assert.Nil(t, resp) + }) + + t.Run("task without cached results", func(t *testing.T) { + repository := repositoryMocks.NewMockRepository() + catalogClient := &mocks.Client{} + mockConfig := getMockExecutionsConfigProvider() + + nodeExecutionModels := []models.NodeExecution{ + { + BaseModel: models.BaseModel{ + ID: 1, + }, + NodeExecutionKey: models.NodeExecutionKey{ + ExecutionKey: models.ExecutionKey{ + Project: executionIdentifier.Project, + Domain: executionIdentifier.Domain, + Name: executionIdentifier.Name, + }, + NodeID: "n0", + }, + Phase: core.NodeExecution_SUCCEEDED.String(), + NodeExecutionMetadata: serializeNodeExecutionMetadata(t, &admin.NodeExecutionMetaData{ + IsParentNode: false, + IsDynamic: false, + SpecNodeId: "n0", + }), + Closure: serializeNodeExecutionClosure(t, &admin.NodeExecutionClosure{ + TargetMetadata: &admin.NodeExecutionClosure_TaskNodeMetadata{ + TaskNodeMetadata: &admin.TaskNodeMetadata{ + CacheStatus: core.CatalogCacheStatus_CACHE_DISABLED, + }, + }, + }), + }, + } + + taskExecutionModels := map[string][]models.TaskExecution{ + "n0": { + { + BaseModel: models.BaseModel{ + ID: 1, + }, + TaskExecutionKey: models.TaskExecutionKey{ + TaskKey: models.TaskKey{ + Project: executionIdentifier.Project, + Domain: executionIdentifier.Domain, + Name: "flyte_task-test.evict.execution_cache", + Version: "version", + }, + NodeExecutionKey: models.NodeExecutionKey{ + ExecutionKey: models.ExecutionKey{ + Project: executionIdentifier.Project, + Domain: executionIdentifier.Domain, + Name: executionIdentifier.Name, + }, + NodeID: "n0", + }, + RetryAttempt: ptr[uint32](0), + }, + Phase: core.NodeExecution_SUCCEEDED.String(), + Closure: serializeTaskExecutionClosure(t, &admin.TaskExecutionClosure{ + Metadata: &event.TaskExecutionMetadata{ + GeneratedName: "name-n0-0", + }, + }), + }, + }, + } + + updatedNodeExecutions := setupCacheEvictionMockRepositories(t, repository, nodeExecutionModels, taskExecutionModels) + + cacheManager := NewCacheManager(repository, mockConfig, catalogClient, promutils.NewTestScope()) + request := service.EvictTaskExecutionCacheRequest{ + TaskExecutionId: &core.TaskExecutionIdentifier{ + TaskId: &core.Identifier{ + ResourceType: core.ResourceType_TASK, + Project: executionIdentifier.Project, + Domain: executionIdentifier.Domain, + Name: executionIdentifier.Name, + Version: version, + }, + NodeExecutionId: &core.NodeExecutionIdentifier{ + ExecutionId: &executionIdentifier, + NodeId: "n0", + }, + RetryAttempt: uint32(0), + }, + } + resp, err := cacheManager.EvictTaskExecutionCache(context.Background(), request) + require.NoError(t, err) + require.NotNil(t, resp) + assert.Empty(t, resp.GetErrors().GetErrors()) + + assert.Empty(t, updatedNodeExecutions) + }) + + t.Run("idempotency", func(t *testing.T) { + repository := repositoryMocks.NewMockRepository() + catalogClient := &mocks.Client{} + mockConfig := getMockExecutionsConfigProvider() + + artifactTags := []*core.CatalogArtifactTag{ + { + ArtifactId: "0285ddb9-ddfb-4835-bc22-80e1bdf7f560", + Name: "flyte_cached-G3ACyxqY0U3sEf99tLMta5vuLCOk7j9O7MStxubzxYM", + }, + } + + nodeExecutionModels := []models.NodeExecution{ + { + BaseModel: models.BaseModel{ + ID: 1, + }, + NodeExecutionKey: models.NodeExecutionKey{ + ExecutionKey: models.ExecutionKey{ + Project: executionIdentifier.Project, + Domain: executionIdentifier.Domain, + Name: executionIdentifier.Name, + }, + NodeID: "n0", + }, + Phase: core.NodeExecution_SUCCEEDED.String(), + NodeExecutionMetadata: serializeNodeExecutionMetadata(t, &admin.NodeExecutionMetaData{ + IsParentNode: false, + IsDynamic: false, + SpecNodeId: "n0", + }), + Closure: serializeNodeExecutionClosure(t, &admin.NodeExecutionClosure{ + TargetMetadata: &admin.NodeExecutionClosure_TaskNodeMetadata{ + TaskNodeMetadata: &admin.TaskNodeMetadata{ + CacheStatus: core.CatalogCacheStatus_CACHE_POPULATED, + CatalogKey: &core.CatalogMetadata{ + DatasetId: &core.Identifier{ + ResourceType: core.ResourceType_DATASET, + Project: executionIdentifier.Project, + Domain: executionIdentifier.Domain, + Name: "flyte_task-test.evict.execution_cache_single_task", + Version: "version", + }, + ArtifactTag: artifactTags[0], + }, + }, + }, + }), + }, + } + + taskExecutionModels := map[string][]models.TaskExecution{ + "n0": { + { + BaseModel: models.BaseModel{ + ID: 1, + }, + TaskExecutionKey: models.TaskExecutionKey{ + TaskKey: models.TaskKey{ + Project: executionIdentifier.Project, + Domain: executionIdentifier.Domain, + Name: "flyte_task-test.evict.execution_cache", + Version: "version", + }, + NodeExecutionKey: models.NodeExecutionKey{ + ExecutionKey: models.ExecutionKey{ + Project: executionIdentifier.Project, + Domain: executionIdentifier.Domain, + Name: executionIdentifier.Name, + }, + NodeID: "n0", + }, + RetryAttempt: ptr[uint32](0), + }, + Phase: core.NodeExecution_SUCCEEDED.String(), + Closure: serializeTaskExecutionClosure(t, &admin.TaskExecutionClosure{ + Metadata: &event.TaskExecutionMetadata{ + GeneratedName: "name-n0-0", + }, + }), + }, + }, + } + + updatedNodeExecutions := setupCacheEvictionMockRepositories(t, repository, nodeExecutionModels, taskExecutionModels) + deletedArtifactIDs := setupCacheEvictionCatalogClient(t, catalogClient, artifactTags, taskExecutionModels) + + cacheManager := NewCacheManager(repository, mockConfig, catalogClient, promutils.NewTestScope()) + request := service.EvictTaskExecutionCacheRequest{ + TaskExecutionId: &core.TaskExecutionIdentifier{ + TaskId: &core.Identifier{ + ResourceType: core.ResourceType_TASK, + Project: executionIdentifier.Project, + Domain: executionIdentifier.Domain, + Name: executionIdentifier.Name, + Version: version, + }, + NodeExecutionId: &core.NodeExecutionIdentifier{ + ExecutionId: &executionIdentifier, + NodeId: "n0", + }, + RetryAttempt: uint32(0), + }, + } + resp, err := cacheManager.EvictTaskExecutionCache(context.Background(), request) + require.NoError(t, err) + require.NotNil(t, resp) + assert.Empty(t, resp.GetErrors().GetErrors()) + + for nodeID := range taskExecutionModels { + assert.Contains(t, updatedNodeExecutions, nodeID) + } + assert.Len(t, updatedNodeExecutions, len(taskExecutionModels)) + + for _, artifactTag := range artifactTags { + assert.Equal(t, 1, deletedArtifactIDs[artifactTag.GetArtifactId()]) + } + assert.Len(t, deletedArtifactIDs, len(artifactTags)) + }) + + t.Run("reserved artifact", func(t *testing.T) { + repository := repositoryMocks.NewMockRepository() + catalogClient := &mocks.Client{} + mockConfig := getMockExecutionsConfigProvider() + + artifactTags := []*core.CatalogArtifactTag{ + { + ArtifactId: "0285ddb9-ddfb-4835-bc22-80e1bdf7f560", + Name: "flyte_cached-G3ACyxqY0U3sEf99tLMta5vuLCOk7j9O7MStxubzxYM", + }, + } + + nodeExecutionModels := []models.NodeExecution{ + { + BaseModel: models.BaseModel{ + ID: 1, + }, + NodeExecutionKey: models.NodeExecutionKey{ + ExecutionKey: models.ExecutionKey{ + Project: executionIdentifier.Project, + Domain: executionIdentifier.Domain, + Name: executionIdentifier.Name, + }, + NodeID: "n0", + }, + Phase: core.NodeExecution_SUCCEEDED.String(), + NodeExecutionMetadata: serializeNodeExecutionMetadata(t, &admin.NodeExecutionMetaData{ + IsParentNode: false, + IsDynamic: false, + SpecNodeId: "n0", + }), + Closure: serializeNodeExecutionClosure(t, &admin.NodeExecutionClosure{ + TargetMetadata: &admin.NodeExecutionClosure_TaskNodeMetadata{ + TaskNodeMetadata: &admin.TaskNodeMetadata{ + CacheStatus: core.CatalogCacheStatus_CACHE_POPULATED, + CatalogKey: &core.CatalogMetadata{ + DatasetId: &core.Identifier{ + ResourceType: core.ResourceType_DATASET, + Project: executionIdentifier.Project, + Domain: executionIdentifier.Domain, + Name: "flyte_task-test.evict.execution_cache_single_task", + Version: "version", + }, + ArtifactTag: artifactTags[0], + }, + }, + }, + }), + }, + } + + taskExecutionModels := map[string][]models.TaskExecution{ + "n0": { + { + BaseModel: models.BaseModel{ + ID: 1, + }, + TaskExecutionKey: models.TaskExecutionKey{ + TaskKey: models.TaskKey{ + Project: executionIdentifier.Project, + Domain: executionIdentifier.Domain, + Name: "flyte_task-test.evict.execution_cache", + Version: "version", + }, + NodeExecutionKey: models.NodeExecutionKey{ + ExecutionKey: models.ExecutionKey{ + Project: executionIdentifier.Project, + Domain: executionIdentifier.Domain, + Name: executionIdentifier.Name, + }, + NodeID: "n0", + }, + RetryAttempt: ptr[uint32](0), + }, + Phase: core.NodeExecution_SUCCEEDED.String(), + Closure: serializeTaskExecutionClosure(t, &admin.TaskExecutionClosure{ + Metadata: &event.TaskExecutionMetadata{ + GeneratedName: "name-n0-0", + }, + }), + }, + }, + } + + updatedNodeExecutions := setupCacheEvictionMockRepositories(t, repository, nodeExecutionModels, taskExecutionModels) + + catalogClient.On("GetOrExtendReservationByArtifactTag", mock.Anything, mock.Anything, mock.Anything, + mock.Anything, mock.Anything).Return(&datacatalog.Reservation{OwnerId: "otherOwnerID"}, nil) + catalogClient.On("ReleaseReservationByArtifactTag", mock.Anything, mock.Anything, + mock.Anything, mock.Anything).Return(nil) + + cacheManager := NewCacheManager(repository, mockConfig, catalogClient, promutils.NewTestScope()) + request := service.EvictTaskExecutionCacheRequest{ + TaskExecutionId: &core.TaskExecutionIdentifier{ + TaskId: &core.Identifier{ + ResourceType: core.ResourceType_TASK, + Project: executionIdentifier.Project, + Domain: executionIdentifier.Domain, + Name: executionIdentifier.Name, + Version: version, + }, + NodeExecutionId: &core.NodeExecutionIdentifier{ + ExecutionId: &executionIdentifier, + NodeId: "n0", + }, + RetryAttempt: uint32(0), + }, + } + resp, err := cacheManager.EvictTaskExecutionCache(context.Background(), request) + require.NoError(t, err) + require.NotNil(t, resp) + assert.Len(t, resp.GetErrors().GetErrors(), len(artifactTags)) + eErr := resp.GetErrors().GetErrors()[0] + assert.Equal(t, core.CacheEvictionError_RESERVATION_NOT_ACQUIRED, eErr.Code) + assert.Equal(t, "n0", eErr.NodeExecutionId.NodeId) + assert.True(t, proto.Equal(&executionIdentifier, eErr.NodeExecutionId.ExecutionId)) + require.NotNil(t, eErr.Source) + assert.IsType(t, &core.CacheEvictionError_TaskExecutionId{}, eErr.Source) + + assert.Empty(t, updatedNodeExecutions) + }) + + t.Run("unknown artifact", func(t *testing.T) { + repository := repositoryMocks.NewMockRepository() + catalogClient := &mocks.Client{} + mockConfig := getMockExecutionsConfigProvider() + + artifactTags := []*core.CatalogArtifactTag{ + { + ArtifactId: "0285ddb9-ddfb-4835-bc22-80e1bdf7f560", + Name: "flyte_cached-G3ACyxqY0U3sEf99tLMta5vuLCOk7j9O7MStxubzxYM", + }, + } + + nodeExecutionModels := []models.NodeExecution{ + { + BaseModel: models.BaseModel{ + ID: 1, + }, + NodeExecutionKey: models.NodeExecutionKey{ + ExecutionKey: models.ExecutionKey{ + Project: executionIdentifier.Project, + Domain: executionIdentifier.Domain, + Name: executionIdentifier.Name, + }, + NodeID: "n0", + }, + Phase: core.NodeExecution_SUCCEEDED.String(), + NodeExecutionMetadata: serializeNodeExecutionMetadata(t, &admin.NodeExecutionMetaData{ + IsParentNode: false, + IsDynamic: false, + SpecNodeId: "n0", + }), + Closure: serializeNodeExecutionClosure(t, &admin.NodeExecutionClosure{ + TargetMetadata: &admin.NodeExecutionClosure_TaskNodeMetadata{ + TaskNodeMetadata: &admin.TaskNodeMetadata{ + CacheStatus: core.CatalogCacheStatus_CACHE_POPULATED, + CatalogKey: &core.CatalogMetadata{ + DatasetId: &core.Identifier{ + ResourceType: core.ResourceType_DATASET, + Project: executionIdentifier.Project, + Domain: executionIdentifier.Domain, + Name: "flyte_task-test.evict.execution_cache_single_task", + Version: "version", + }, + ArtifactTag: artifactTags[0], + }, + }, + }, + }), + }, + } + + taskExecutionModels := map[string][]models.TaskExecution{ + "n0": { + { + BaseModel: models.BaseModel{ + ID: 1, + }, + TaskExecutionKey: models.TaskExecutionKey{ + TaskKey: models.TaskKey{ + Project: executionIdentifier.Project, + Domain: executionIdentifier.Domain, + Name: "flyte_task-test.evict.execution_cache", + Version: "version", + }, + NodeExecutionKey: models.NodeExecutionKey{ + ExecutionKey: models.ExecutionKey{ + Project: executionIdentifier.Project, + Domain: executionIdentifier.Domain, + Name: executionIdentifier.Name, + }, + NodeID: "n0", + }, + RetryAttempt: ptr[uint32](0), + }, + Phase: core.NodeExecution_SUCCEEDED.String(), + Closure: serializeTaskExecutionClosure(t, &admin.TaskExecutionClosure{ + Metadata: &event.TaskExecutionMetadata{ + GeneratedName: "name-n0-0", + }, + }), + }, + }, + } + + updatedNodeExecutions := setupCacheEvictionMockRepositories(t, repository, nodeExecutionModels, taskExecutionModels) + + for nodeID := range taskExecutionModels { + for _, taskExecution := range taskExecutionModels[nodeID] { + require.NotNil(t, taskExecution.RetryAttempt) + ownerID := fmt.Sprintf("%s-%s-%d", executionIdentifier.Name, nodeID, *taskExecution.RetryAttempt) + for _, artifactTag := range artifactTags { + catalogClient.On("GetOrExtendReservationByArtifactTag", mock.Anything, mock.Anything, + artifactTag.GetName(), ownerID, mock.Anything).Return(&datacatalog.Reservation{OwnerId: ownerID}, nil) + catalogClient.On("ReleaseReservationByArtifactTag", mock.Anything, mock.Anything, + artifactTag.GetName(), ownerID).Return(nil) + } + } + } + + catalogClient.On("DeleteByArtifactID", mock.Anything, mock.Anything, mock.Anything). + Return(status.Error(codes.NotFound, "not found")) + + cacheManager := NewCacheManager(repository, mockConfig, catalogClient, promutils.NewTestScope()) + request := service.EvictTaskExecutionCacheRequest{ + TaskExecutionId: &core.TaskExecutionIdentifier{ + TaskId: &core.Identifier{ + ResourceType: core.ResourceType_TASK, + Project: executionIdentifier.Project, + Domain: executionIdentifier.Domain, + Name: executionIdentifier.Name, + Version: version, + }, + NodeExecutionId: &core.NodeExecutionIdentifier{ + ExecutionId: &executionIdentifier, + NodeId: "n0", + }, + RetryAttempt: uint32(0), + }, + } + resp, err := cacheManager.EvictTaskExecutionCache(context.Background(), request) + require.NoError(t, err) + require.NotNil(t, resp) + assert.Empty(t, resp.GetErrors().GetErrors()) + + for nodeID := range taskExecutionModels { + assert.Contains(t, updatedNodeExecutions, nodeID) + } + assert.Len(t, updatedNodeExecutions, len(taskExecutionModels)) + }) + + t.Run("datacatalog error", func(t *testing.T) { + t.Run("GetOrExtendReservationByArtifactTag", func(t *testing.T) { + repository := repositoryMocks.NewMockRepository() + catalogClient := &mocks.Client{} + mockConfig := getMockExecutionsConfigProvider() + + artifactTags := []*core.CatalogArtifactTag{ + { + ArtifactId: "0285ddb9-ddfb-4835-bc22-80e1bdf7f560", + Name: "flyte_cached-G3ACyxqY0U3sEf99tLMta5vuLCOk7j9O7MStxubzxYM", + }, + } + + nodeExecutionModels := []models.NodeExecution{ + { + BaseModel: models.BaseModel{ + ID: 1, + }, + NodeExecutionKey: models.NodeExecutionKey{ + ExecutionKey: models.ExecutionKey{ + Project: executionIdentifier.Project, + Domain: executionIdentifier.Domain, + Name: executionIdentifier.Name, + }, + NodeID: "n0", + }, + Phase: core.NodeExecution_SUCCEEDED.String(), + NodeExecutionMetadata: serializeNodeExecutionMetadata(t, &admin.NodeExecutionMetaData{ + IsParentNode: false, + IsDynamic: false, + SpecNodeId: "n0", + }), + Closure: serializeNodeExecutionClosure(t, &admin.NodeExecutionClosure{ + TargetMetadata: &admin.NodeExecutionClosure_TaskNodeMetadata{ + TaskNodeMetadata: &admin.TaskNodeMetadata{ + CacheStatus: core.CatalogCacheStatus_CACHE_POPULATED, + CatalogKey: &core.CatalogMetadata{ + DatasetId: &core.Identifier{ + ResourceType: core.ResourceType_DATASET, + Project: executionIdentifier.Project, + Domain: executionIdentifier.Domain, + Name: "flyte_task-test.evict.execution_cache_single_task", + Version: "version", + }, + ArtifactTag: artifactTags[0], + }, + }, + }, + }), + }, + } + + taskExecutionModels := map[string][]models.TaskExecution{ + "n0": { + { + BaseModel: models.BaseModel{ + ID: 1, + }, + TaskExecutionKey: models.TaskExecutionKey{ + TaskKey: models.TaskKey{ + Project: executionIdentifier.Project, + Domain: executionIdentifier.Domain, + Name: "flyte_task-test.evict.execution_cache", + Version: "version", + }, + NodeExecutionKey: models.NodeExecutionKey{ + ExecutionKey: models.ExecutionKey{ + Project: executionIdentifier.Project, + Domain: executionIdentifier.Domain, + Name: executionIdentifier.Name, + }, + NodeID: "n0", + }, + RetryAttempt: ptr[uint32](0), + }, + Phase: core.NodeExecution_SUCCEEDED.String(), + Closure: serializeTaskExecutionClosure(t, &admin.TaskExecutionClosure{ + Metadata: &event.TaskExecutionMetadata{ + GeneratedName: "name-n0-0", + }, + }), + }, + }, + } + + updatedNodeExecutions := setupCacheEvictionMockRepositories(t, repository, nodeExecutionModels, taskExecutionModels) + + catalogClient.On("GetOrExtendReservationByArtifactTag", mock.Anything, mock.Anything, + mock.Anything, mock.Anything, mock.Anything).Return(nil, status.Error(codes.Internal, "error")) + + cacheManager := NewCacheManager(repository, mockConfig, catalogClient, promutils.NewTestScope()) + request := service.EvictTaskExecutionCacheRequest{ + TaskExecutionId: &core.TaskExecutionIdentifier{ + TaskId: &core.Identifier{ + ResourceType: core.ResourceType_TASK, + Project: executionIdentifier.Project, + Domain: executionIdentifier.Domain, + Name: executionIdentifier.Name, + Version: version, + }, + NodeExecutionId: &core.NodeExecutionIdentifier{ + ExecutionId: &executionIdentifier, + NodeId: "n0", + }, + RetryAttempt: uint32(0), + }, + } + resp, err := cacheManager.EvictTaskExecutionCache(context.Background(), request) + require.NoError(t, err) + require.NotNil(t, resp) + assert.Len(t, resp.GetErrors().GetErrors(), len(artifactTags)) + eErr := resp.GetErrors().GetErrors()[0] + assert.Equal(t, core.CacheEvictionError_RESERVATION_NOT_ACQUIRED, eErr.Code) + assert.Equal(t, "n0", eErr.NodeExecutionId.NodeId) + assert.True(t, proto.Equal(&executionIdentifier, eErr.NodeExecutionId.ExecutionId)) + require.NotNil(t, eErr.Source) + assert.IsType(t, &core.CacheEvictionError_TaskExecutionId{}, eErr.Source) + + assert.Empty(t, updatedNodeExecutions) + }) + + t.Run("DeleteByArtifactID", func(t *testing.T) { + repository := repositoryMocks.NewMockRepository() + catalogClient := &mocks.Client{} + mockConfig := getMockExecutionsConfigProvider() + + artifactTags := []*core.CatalogArtifactTag{ + { + ArtifactId: "0285ddb9-ddfb-4835-bc22-80e1bdf7f560", + Name: "flyte_cached-G3ACyxqY0U3sEf99tLMta5vuLCOk7j9O7MStxubzxYM", + }, + } + + nodeExecutionModels := []models.NodeExecution{ + { + BaseModel: models.BaseModel{ + ID: 1, + }, + NodeExecutionKey: models.NodeExecutionKey{ + ExecutionKey: models.ExecutionKey{ + Project: executionIdentifier.Project, + Domain: executionIdentifier.Domain, + Name: executionIdentifier.Name, + }, + NodeID: "n0", + }, + Phase: core.NodeExecution_SUCCEEDED.String(), + NodeExecutionMetadata: serializeNodeExecutionMetadata(t, &admin.NodeExecutionMetaData{ + IsParentNode: false, + IsDynamic: false, + SpecNodeId: "n0", + }), + Closure: serializeNodeExecutionClosure(t, &admin.NodeExecutionClosure{ + TargetMetadata: &admin.NodeExecutionClosure_TaskNodeMetadata{ + TaskNodeMetadata: &admin.TaskNodeMetadata{ + CacheStatus: core.CatalogCacheStatus_CACHE_POPULATED, + CatalogKey: &core.CatalogMetadata{ + DatasetId: &core.Identifier{ + ResourceType: core.ResourceType_DATASET, + Project: executionIdentifier.Project, + Domain: executionIdentifier.Domain, + Name: "flyte_task-test.evict.execution_cache_single_task", + Version: "version", + }, + ArtifactTag: artifactTags[0], + }, + }, + }, + }), + }, + } + + taskExecutionModels := map[string][]models.TaskExecution{ + "n0": { + { + BaseModel: models.BaseModel{ + ID: 1, + }, + TaskExecutionKey: models.TaskExecutionKey{ + TaskKey: models.TaskKey{ + Project: executionIdentifier.Project, + Domain: executionIdentifier.Domain, + Name: "flyte_task-test.evict.execution_cache", + Version: "version", + }, + NodeExecutionKey: models.NodeExecutionKey{ + ExecutionKey: models.ExecutionKey{ + Project: executionIdentifier.Project, + Domain: executionIdentifier.Domain, + Name: executionIdentifier.Name, + }, + NodeID: "n0", + }, + RetryAttempt: ptr[uint32](0), + }, + Phase: core.NodeExecution_SUCCEEDED.String(), + Closure: serializeTaskExecutionClosure(t, &admin.TaskExecutionClosure{ + Metadata: &event.TaskExecutionMetadata{ + GeneratedName: "name-n0-0", + }, + }), + }, + }, + } + + updatedNodeExecutions := setupCacheEvictionMockRepositories(t, repository, nodeExecutionModels, taskExecutionModels) + + for nodeID := range taskExecutionModels { + for _, taskExecution := range taskExecutionModels[nodeID] { + require.NotNil(t, taskExecution.RetryAttempt) + ownerID := fmt.Sprintf("%s-%s-%d", executionIdentifier.Name, nodeID, *taskExecution.RetryAttempt) + for _, artifactTag := range artifactTags { + catalogClient.On("GetOrExtendReservationByArtifactTag", mock.Anything, mock.Anything, + artifactTag.GetName(), ownerID, mock.Anything).Return(&datacatalog.Reservation{OwnerId: ownerID}, nil) + } + } + } + + catalogClient.On("DeleteByArtifactID", mock.Anything, mock.Anything, mock.Anything). + Return(status.Error(codes.Internal, "error")) + catalogClient.On("ReleaseReservationByArtifactTag", mock.Anything, mock.Anything, + mock.Anything, mock.Anything).Return(nil) + + cacheManager := NewCacheManager(repository, mockConfig, catalogClient, promutils.NewTestScope()) + request := service.EvictTaskExecutionCacheRequest{ + TaskExecutionId: &core.TaskExecutionIdentifier{ + TaskId: &core.Identifier{ + ResourceType: core.ResourceType_TASK, + Project: executionIdentifier.Project, + Domain: executionIdentifier.Domain, + Name: executionIdentifier.Name, + Version: version, + }, + NodeExecutionId: &core.NodeExecutionIdentifier{ + ExecutionId: &executionIdentifier, + NodeId: "n0", + }, + RetryAttempt: uint32(0), + }, + } + resp, err := cacheManager.EvictTaskExecutionCache(context.Background(), request) + require.NoError(t, err) + require.NotNil(t, resp) + assert.Len(t, resp.GetErrors().GetErrors(), len(artifactTags)) + eErr := resp.GetErrors().GetErrors()[0] + assert.Equal(t, core.CacheEvictionError_ARTIFACT_DELETE_FAILED, eErr.Code) + assert.Equal(t, "n0", eErr.NodeExecutionId.NodeId) + assert.True(t, proto.Equal(&executionIdentifier, eErr.NodeExecutionId.ExecutionId)) + require.NotNil(t, eErr.Source) + assert.IsType(t, &core.CacheEvictionError_TaskExecutionId{}, eErr.Source) + + assert.Len(t, updatedNodeExecutions, 0) + }) + + t.Run("ReleaseReservationByArtifactTag", func(t *testing.T) { + repository := repositoryMocks.NewMockRepository() + catalogClient := &mocks.Client{} + mockConfig := getMockExecutionsConfigProvider() + + artifactTags := []*core.CatalogArtifactTag{ + { + ArtifactId: "0285ddb9-ddfb-4835-bc22-80e1bdf7f560", + Name: "flyte_cached-G3ACyxqY0U3sEf99tLMta5vuLCOk7j9O7MStxubzxYM", + }, + } + + nodeExecutionModels := []models.NodeExecution{ + { + BaseModel: models.BaseModel{ + ID: 1, + }, + NodeExecutionKey: models.NodeExecutionKey{ + ExecutionKey: models.ExecutionKey{ + Project: executionIdentifier.Project, + Domain: executionIdentifier.Domain, + Name: executionIdentifier.Name, + }, + NodeID: "n0", + }, + Phase: core.NodeExecution_SUCCEEDED.String(), + NodeExecutionMetadata: serializeNodeExecutionMetadata(t, &admin.NodeExecutionMetaData{ + IsParentNode: false, + IsDynamic: false, + SpecNodeId: "n0", + }), + Closure: serializeNodeExecutionClosure(t, &admin.NodeExecutionClosure{ + TargetMetadata: &admin.NodeExecutionClosure_TaskNodeMetadata{ + TaskNodeMetadata: &admin.TaskNodeMetadata{ + CacheStatus: core.CatalogCacheStatus_CACHE_POPULATED, + CatalogKey: &core.CatalogMetadata{ + DatasetId: &core.Identifier{ + ResourceType: core.ResourceType_DATASET, + Project: executionIdentifier.Project, + Domain: executionIdentifier.Domain, + Name: "flyte_task-test.evict.execution_cache_single_task", + Version: "version", + }, + ArtifactTag: artifactTags[0], + }, + }, + }, + }), + }, + } + + taskExecutionModels := map[string][]models.TaskExecution{ + "n0": { + { + BaseModel: models.BaseModel{ + ID: 1, + }, + TaskExecutionKey: models.TaskExecutionKey{ + TaskKey: models.TaskKey{ + Project: executionIdentifier.Project, + Domain: executionIdentifier.Domain, + Name: "flyte_task-test.evict.execution_cache", + Version: "version", + }, + NodeExecutionKey: models.NodeExecutionKey{ + ExecutionKey: models.ExecutionKey{ + Project: executionIdentifier.Project, + Domain: executionIdentifier.Domain, + Name: executionIdentifier.Name, + }, + NodeID: "n0", + }, + RetryAttempt: ptr[uint32](0), + }, + Phase: core.NodeExecution_SUCCEEDED.String(), + Closure: serializeTaskExecutionClosure(t, &admin.TaskExecutionClosure{ + Metadata: &event.TaskExecutionMetadata{ + GeneratedName: "name-n0-0", + }, + }), + }, + }, + } + + updatedNodeExecutions := setupCacheEvictionMockRepositories(t, repository, nodeExecutionModels, taskExecutionModels) + + for nodeID := range taskExecutionModels { + for _, taskExecution := range taskExecutionModels[nodeID] { + require.NotNil(t, taskExecution.RetryAttempt) + ownerID := fmt.Sprintf("%s-%s-%d", executionIdentifier.Name, nodeID, *taskExecution.RetryAttempt) + for _, artifactTag := range artifactTags { + catalogClient.On("GetOrExtendReservationByArtifactTag", mock.Anything, mock.Anything, + artifactTag.GetName(), ownerID, mock.Anything).Return(&datacatalog.Reservation{OwnerId: ownerID}, nil) + } + } + } + + deletedArtifactIDs := make(map[string]int) + for _, artifactTag := range artifactTags { + catalogClient.On("DeleteByArtifactID", mock.Anything, mock.Anything, artifactTag.GetArtifactId()). + Run(func(args mock.Arguments) { + deletedArtifactIDs[args.Get(2).(string)] = deletedArtifactIDs[args.Get(2).(string)] + 1 + }). + Return(nil) + } + + catalogClient.On("ReleaseReservationByArtifactTag", mock.Anything, mock.Anything, + mock.Anything, mock.Anything).Return(status.Error(codes.Internal, "error")) + + cacheManager := NewCacheManager(repository, mockConfig, catalogClient, promutils.NewTestScope()) + request := service.EvictTaskExecutionCacheRequest{ + TaskExecutionId: &core.TaskExecutionIdentifier{ + TaskId: &core.Identifier{ + ResourceType: core.ResourceType_TASK, + Project: executionIdentifier.Project, + Domain: executionIdentifier.Domain, + Name: executionIdentifier.Name, + Version: version, + }, + NodeExecutionId: &core.NodeExecutionIdentifier{ + ExecutionId: &executionIdentifier, + NodeId: "n0", + }, + RetryAttempt: uint32(0), + }, + } + resp, err := cacheManager.EvictTaskExecutionCache(context.Background(), request) + require.NoError(t, err) + require.NotNil(t, resp) + assert.Len(t, resp.GetErrors().GetErrors(), len(artifactTags)) + eErr := resp.GetErrors().GetErrors()[0] + assert.Equal(t, core.CacheEvictionError_RESERVATION_NOT_RELEASED, eErr.Code) + assert.Equal(t, "n0", eErr.NodeExecutionId.NodeId) + assert.True(t, proto.Equal(&executionIdentifier, eErr.NodeExecutionId.ExecutionId)) + require.NotNil(t, eErr.Source) + assert.IsType(t, &core.CacheEvictionError_TaskExecutionId{}, eErr.Source) + + for nodeID := range taskExecutionModels { + assert.Contains(t, updatedNodeExecutions, nodeID) + } + assert.Len(t, updatedNodeExecutions, len(taskExecutionModels)) + }) + }) + + t.Run("repository error", func(t *testing.T) { + t.Run("NodeExecutionRepo", func(t *testing.T) { + t.Run("Get", func(t *testing.T) { + repository := repositoryMocks.NewMockRepository() + catalogClient := &mocks.Client{} + mockConfig := getMockExecutionsConfigProvider() + + artifactTags := []*core.CatalogArtifactTag{ + { + ArtifactId: "0285ddb9-ddfb-4835-bc22-80e1bdf7f560", + Name: "flyte_cached-G3ACyxqY0U3sEf99tLMta5vuLCOk7j9O7MStxubzxYM", + }, + } + + nodeExecutionModels := []models.NodeExecution{ + { + BaseModel: models.BaseModel{ + ID: 1, + }, + NodeExecutionKey: models.NodeExecutionKey{ + ExecutionKey: models.ExecutionKey{ + Project: executionIdentifier.Project, + Domain: executionIdentifier.Domain, + Name: executionIdentifier.Name, + }, + NodeID: "n0", + }, + Phase: core.NodeExecution_SUCCEEDED.String(), + NodeExecutionMetadata: serializeNodeExecutionMetadata(t, &admin.NodeExecutionMetaData{ + IsParentNode: false, + IsDynamic: false, + SpecNodeId: "n0", + }), + Closure: serializeNodeExecutionClosure(t, &admin.NodeExecutionClosure{ + TargetMetadata: &admin.NodeExecutionClosure_TaskNodeMetadata{ + TaskNodeMetadata: &admin.TaskNodeMetadata{ + CacheStatus: core.CatalogCacheStatus_CACHE_POPULATED, + CatalogKey: &core.CatalogMetadata{ + DatasetId: &core.Identifier{ + ResourceType: core.ResourceType_DATASET, + Project: executionIdentifier.Project, + Domain: executionIdentifier.Domain, + Name: "flyte_task-test.evict.execution_cache_single_task", + Version: "version", + }, + ArtifactTag: artifactTags[0], + }, + }, + }, + }), + }, + } + + taskExecutionModels := map[string][]models.TaskExecution{ + "n0": { + { + BaseModel: models.BaseModel{ + ID: 1, + }, + TaskExecutionKey: models.TaskExecutionKey{ + TaskKey: models.TaskKey{ + Project: executionIdentifier.Project, + Domain: executionIdentifier.Domain, + Name: "flyte_task-test.evict.execution_cache", + Version: "version", + }, + NodeExecutionKey: models.NodeExecutionKey{ + ExecutionKey: models.ExecutionKey{ + Project: executionIdentifier.Project, + Domain: executionIdentifier.Domain, + Name: executionIdentifier.Name, + }, + NodeID: "n0", + }, + RetryAttempt: ptr[uint32](0), + }, + Phase: core.NodeExecution_SUCCEEDED.String(), + Closure: serializeTaskExecutionClosure(t, &admin.TaskExecutionClosure{ + Metadata: &event.TaskExecutionMetadata{ + GeneratedName: "name-n0-0", + }, + }), + }, + }, + } + + updatedNodeExecutions := setupCacheEvictionMockRepositories(t, repository, nodeExecutionModels, taskExecutionModels) + + repository.NodeExecutionRepo().(*repositoryMocks.MockNodeExecutionRepo).SetGetCallback( + func(ctx context.Context, input interfaces.NodeExecutionResource) (models.NodeExecution, error) { + return models.NodeExecution{}, flyteAdminErrors.NewFlyteAdminErrorf(codes.Internal, "error") + }) + + cacheManager := NewCacheManager(repository, mockConfig, catalogClient, promutils.NewTestScope()) + request := service.EvictTaskExecutionCacheRequest{ + TaskExecutionId: &core.TaskExecutionIdentifier{ + TaskId: &core.Identifier{ + ResourceType: core.ResourceType_TASK, + Project: executionIdentifier.Project, + Domain: executionIdentifier.Domain, + Name: executionIdentifier.Name, + Version: version, + }, + NodeExecutionId: &core.NodeExecutionIdentifier{ + ExecutionId: &executionIdentifier, + NodeId: "n0", + }, + RetryAttempt: uint32(0), + }, + } + resp, err := cacheManager.EvictTaskExecutionCache(context.Background(), request) + require.Error(t, err) + s, ok := status.FromError(err) + require.True(t, ok) + assert.Equal(t, codes.Internal, s.Code()) + assert.Nil(t, resp) + + assert.Empty(t, updatedNodeExecutions) + }) + + t.Run("Update", func(t *testing.T) { + repository := repositoryMocks.NewMockRepository() + catalogClient := &mocks.Client{} + mockConfig := getMockExecutionsConfigProvider() + + artifactTags := []*core.CatalogArtifactTag{ + { + ArtifactId: "0285ddb9-ddfb-4835-bc22-80e1bdf7f560", + Name: "flyte_cached-G3ACyxqY0U3sEf99tLMta5vuLCOk7j9O7MStxubzxYM", + }, + } + + nodeExecutionModels := []models.NodeExecution{ + { + BaseModel: models.BaseModel{ + ID: 1, + }, + NodeExecutionKey: models.NodeExecutionKey{ + ExecutionKey: models.ExecutionKey{ + Project: executionIdentifier.Project, + Domain: executionIdentifier.Domain, + Name: executionIdentifier.Name, + }, + NodeID: "n0", + }, + Phase: core.NodeExecution_SUCCEEDED.String(), + NodeExecutionMetadata: serializeNodeExecutionMetadata(t, &admin.NodeExecutionMetaData{ + IsParentNode: false, + IsDynamic: false, + SpecNodeId: "n0", + }), + Closure: serializeNodeExecutionClosure(t, &admin.NodeExecutionClosure{ + TargetMetadata: &admin.NodeExecutionClosure_TaskNodeMetadata{ + TaskNodeMetadata: &admin.TaskNodeMetadata{ + CacheStatus: core.CatalogCacheStatus_CACHE_POPULATED, + CatalogKey: &core.CatalogMetadata{ + DatasetId: &core.Identifier{ + ResourceType: core.ResourceType_DATASET, + Project: executionIdentifier.Project, + Domain: executionIdentifier.Domain, + Name: "flyte_task-test.evict.execution_cache_single_task", + Version: "version", + }, + ArtifactTag: artifactTags[0], + }, + }, + }, + }), + }, + } + + taskExecutionModels := map[string][]models.TaskExecution{ + "n0": { + { + BaseModel: models.BaseModel{ + ID: 1, + }, + TaskExecutionKey: models.TaskExecutionKey{ + TaskKey: models.TaskKey{ + Project: executionIdentifier.Project, + Domain: executionIdentifier.Domain, + Name: "flyte_task-test.evict.execution_cache", + Version: "version", + }, + NodeExecutionKey: models.NodeExecutionKey{ + ExecutionKey: models.ExecutionKey{ + Project: executionIdentifier.Project, + Domain: executionIdentifier.Domain, + Name: executionIdentifier.Name, + }, + NodeID: "n0", + }, + RetryAttempt: ptr[uint32](0), + }, + Phase: core.NodeExecution_SUCCEEDED.String(), + Closure: serializeTaskExecutionClosure(t, &admin.TaskExecutionClosure{ + Metadata: &event.TaskExecutionMetadata{ + GeneratedName: "name-n0-0", + }, + }), + }, + }, + } + + updatedNodeExecutions := setupCacheEvictionMockRepositories(t, repository, nodeExecutionModels, taskExecutionModels) + + for nodeID := range taskExecutionModels { + for _, taskExecution := range taskExecutionModels[nodeID] { + require.NotNil(t, taskExecution.RetryAttempt) + ownerID := fmt.Sprintf("%s-%s-%d", executionIdentifier.Name, nodeID, *taskExecution.RetryAttempt) + for _, artifactTag := range artifactTags { + catalogClient.On("GetOrExtendReservationByArtifactTag", mock.Anything, mock.Anything, + artifactTag.GetName(), ownerID, mock.Anything).Return(&datacatalog.Reservation{OwnerId: ownerID}, nil) + catalogClient.On("ReleaseReservationByArtifactTag", mock.Anything, mock.Anything, + artifactTag.GetName(), ownerID).Return(nil) + catalogClient.On("DeleteByArtifactID", mock.Anything, mock.Anything, artifactTag.GetArtifactId()). + Return(nil) + } + } + } + + repository.NodeExecutionRepo().(*repositoryMocks.MockNodeExecutionRepo).SetUpdateCallback( + func(ctx context.Context, nodeExecution *models.NodeExecution) error { + return flyteAdminErrors.NewFlyteAdminError(codes.Internal, "error") + }) + + cacheManager := NewCacheManager(repository, mockConfig, catalogClient, promutils.NewTestScope()) + request := service.EvictTaskExecutionCacheRequest{ + TaskExecutionId: &core.TaskExecutionIdentifier{ + TaskId: &core.Identifier{ + ResourceType: core.ResourceType_TASK, + Project: executionIdentifier.Project, + Domain: executionIdentifier.Domain, + Name: executionIdentifier.Name, + Version: version, + }, + NodeExecutionId: &core.NodeExecutionIdentifier{ + ExecutionId: &executionIdentifier, + NodeId: "n0", + }, + RetryAttempt: uint32(0), + }, + } + resp, err := cacheManager.EvictTaskExecutionCache(context.Background(), request) + require.NoError(t, err) + require.NotNil(t, resp) + assert.Len(t, resp.GetErrors().GetErrors(), len(artifactTags)) + eErr := resp.GetErrors().GetErrors()[0] + assert.Equal(t, core.CacheEvictionError_DATABASE_UPDATE_FAILED, eErr.Code) + assert.Equal(t, "n0", eErr.NodeExecutionId.NodeId) + assert.True(t, proto.Equal(&executionIdentifier, eErr.NodeExecutionId.ExecutionId)) + require.NotNil(t, eErr.Source) + assert.IsType(t, &core.CacheEvictionError_TaskExecutionId{}, eErr.Source) + + assert.Empty(t, updatedNodeExecutions) + }) + }) + + t.Run("TaskExecutionRepo", func(t *testing.T) { + t.Run("Get", func(t *testing.T) { + repository := repositoryMocks.NewMockRepository() + catalogClient := &mocks.Client{} + mockConfig := getMockExecutionsConfigProvider() + + artifactTags := []*core.CatalogArtifactTag{ + { + ArtifactId: "0285ddb9-ddfb-4835-bc22-80e1bdf7f560", + Name: "flyte_cached-G3ACyxqY0U3sEf99tLMta5vuLCOk7j9O7MStxubzxYM", + }, + } + + nodeExecutionModels := []models.NodeExecution{ + { + BaseModel: models.BaseModel{ + ID: 1, + }, + NodeExecutionKey: models.NodeExecutionKey{ + ExecutionKey: models.ExecutionKey{ + Project: executionIdentifier.Project, + Domain: executionIdentifier.Domain, + Name: executionIdentifier.Name, + }, + NodeID: "n0", + }, + Phase: core.NodeExecution_SUCCEEDED.String(), + NodeExecutionMetadata: serializeNodeExecutionMetadata(t, &admin.NodeExecutionMetaData{ + IsParentNode: false, + IsDynamic: false, + SpecNodeId: "n0", + }), + Closure: serializeNodeExecutionClosure(t, &admin.NodeExecutionClosure{ + TargetMetadata: &admin.NodeExecutionClosure_TaskNodeMetadata{ + TaskNodeMetadata: &admin.TaskNodeMetadata{ + CacheStatus: core.CatalogCacheStatus_CACHE_POPULATED, + CatalogKey: &core.CatalogMetadata{ + DatasetId: &core.Identifier{ + ResourceType: core.ResourceType_DATASET, + Project: executionIdentifier.Project, + Domain: executionIdentifier.Domain, + Name: "flyte_task-test.evict.execution_cache_single_task", + Version: "version", + }, + ArtifactTag: artifactTags[0], + }, + }, + }, + }), + }, + } + + taskExecutionModels := map[string][]models.TaskExecution{ + "n0": { + { + BaseModel: models.BaseModel{ + ID: 1, + }, + TaskExecutionKey: models.TaskExecutionKey{ + TaskKey: models.TaskKey{ + Project: executionIdentifier.Project, + Domain: executionIdentifier.Domain, + Name: "flyte_task-test.evict.execution_cache", + Version: "version", + }, + NodeExecutionKey: models.NodeExecutionKey{ + ExecutionKey: models.ExecutionKey{ + Project: executionIdentifier.Project, + Domain: executionIdentifier.Domain, + Name: executionIdentifier.Name, + }, + NodeID: "n0", + }, + RetryAttempt: ptr[uint32](0), + }, + Phase: core.NodeExecution_SUCCEEDED.String(), + Closure: serializeTaskExecutionClosure(t, &admin.TaskExecutionClosure{ + Metadata: &event.TaskExecutionMetadata{ + GeneratedName: "name-n0-0", + }, + }), + }, + }, + } + + updatedNodeExecutions := setupCacheEvictionMockRepositories(t, repository, nodeExecutionModels, taskExecutionModels) + + repository.TaskExecutionRepo().(*repositoryMocks.MockTaskExecutionRepo).SetGetCallback( + func(ctx context.Context, input interfaces.GetTaskExecutionInput) (models.TaskExecution, error) { + return models.TaskExecution{}, flyteAdminErrors.NewFlyteAdminError(codes.Internal, "error") + }) + + cacheManager := NewCacheManager(repository, mockConfig, catalogClient, promutils.NewTestScope()) + request := service.EvictTaskExecutionCacheRequest{ + TaskExecutionId: &core.TaskExecutionIdentifier{ + TaskId: &core.Identifier{ + ResourceType: core.ResourceType_TASK, + Project: executionIdentifier.Project, + Domain: executionIdentifier.Domain, + Name: executionIdentifier.Name, + Version: version, + }, + NodeExecutionId: &core.NodeExecutionIdentifier{ + ExecutionId: &executionIdentifier, + NodeId: "n0", + }, + RetryAttempt: uint32(0), + }, + } + resp, err := cacheManager.EvictTaskExecutionCache(context.Background(), request) + require.Error(t, err) + s, ok := status.FromError(err) + require.True(t, ok) + assert.Equal(t, codes.Internal, s.Code()) + assert.Nil(t, resp) + + assert.Empty(t, updatedNodeExecutions) + }) + }) + }) +} diff --git a/flyteadmin/pkg/manager/impl/execution_manager_test.go b/flyteadmin/pkg/manager/impl/execution_manager_test.go index d6a05cc214..d675b04cc1 100644 --- a/flyteadmin/pkg/manager/impl/execution_manager_test.go +++ b/flyteadmin/pkg/manager/impl/execution_manager_test.go @@ -394,6 +394,7 @@ func TestCreateExecution(t *testing.T) { Id: &executionIdentifier, } assert.Nil(t, err) + assert.True(t, proto.Equal(expectedResponse.Id, response.Id)) // TODO: Check for offloaded inputs diff --git a/flyteadmin/pkg/manager/impl/shared/constants.go b/flyteadmin/pkg/manager/impl/shared/constants.go index 469bd3e3ba..09684468ba 100644 --- a/flyteadmin/pkg/manager/impl/shared/constants.go +++ b/flyteadmin/pkg/manager/impl/shared/constants.go @@ -35,4 +35,6 @@ const ( // Parent of a node execution in the node executions table ParentID = "parent_id" WorkflowClosure = "workflow_closure" + CreatedAt = "created_at" + Closure = "closure" ) diff --git a/flyteadmin/pkg/manager/interfaces/cache.go b/flyteadmin/pkg/manager/interfaces/cache.go new file mode 100644 index 0000000000..f081fd98a3 --- /dev/null +++ b/flyteadmin/pkg/manager/interfaces/cache.go @@ -0,0 +1,11 @@ +package interfaces + +import ( + "context" + + "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/service" +) + +type CacheInterface interface { + EvictTaskExecutionCache(ctx context.Context, request service.EvictTaskExecutionCacheRequest) (*service.EvictCacheResponse, error) +} diff --git a/flyteadmin/pkg/manager/mocks/cache.go b/flyteadmin/pkg/manager/mocks/cache.go new file mode 100644 index 0000000000..e6e767a8e8 --- /dev/null +++ b/flyteadmin/pkg/manager/mocks/cache.go @@ -0,0 +1,29 @@ +package mocks + +import ( + "context" + + "github.com/flyteorg/flyte/flyteadmin/pkg/manager/interfaces" + "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/service" +) + +var ( + _ interfaces.CacheInterface = &MockCacheManager{} +) + +type EvictTaskExecutionCacheFunc func(ctx context.Context, req service.EvictTaskExecutionCacheRequest) (*service.EvictCacheResponse, error) + +type MockCacheManager struct { + evictTaskExecutionCacheFunc EvictTaskExecutionCacheFunc +} + +func (m *MockCacheManager) SetEvictTaskExecutionCacheFunc(evictTaskExecutionCacheFunc EvictTaskExecutionCacheFunc) { + m.evictTaskExecutionCacheFunc = evictTaskExecutionCacheFunc +} + +func (m *MockCacheManager) EvictTaskExecutionCache(ctx context.Context, req service.EvictTaskExecutionCacheRequest) (*service.EvictCacheResponse, error) { + if m.evictTaskExecutionCacheFunc != nil { + return m.evictTaskExecutionCacheFunc(ctx, req) + } + return nil, nil +} diff --git a/flyteadmin/pkg/rpc/cacheservice/base.go b/flyteadmin/pkg/rpc/cacheservice/base.go new file mode 100644 index 0000000000..18c3b88801 --- /dev/null +++ b/flyteadmin/pkg/rpc/cacheservice/base.go @@ -0,0 +1,85 @@ +package cacheservice + +import ( + "context" + "fmt" + "runtime/debug" + + "github.com/golang/protobuf/proto" + "google.golang.org/grpc" + + manager "github.com/flyteorg/flyte/flyteadmin/pkg/manager/impl" + "github.com/flyteorg/flyte/flyteadmin/pkg/manager/interfaces" + "github.com/flyteorg/flyte/flyteadmin/pkg/repositories" + "github.com/flyteorg/flyte/flyteadmin/pkg/repositories/errors" + runtimeInterfaces "github.com/flyteorg/flyte/flyteadmin/pkg/runtime/interfaces" + "github.com/flyteorg/flyte/flyteidl/clients/go/admin" + "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/service" + "github.com/flyteorg/flyte/flytestdlib/catalog" + "github.com/flyteorg/flyte/flytestdlib/logger" + "github.com/flyteorg/flyte/flytestdlib/promutils" + "github.com/flyteorg/flyte/flytestdlib/storage" +) + +type CacheService struct { + service.UnimplementedCacheServiceServer + + CacheManager interfaces.CacheInterface + Metrics CacheMetrics +} + +// Intercepts all cache requests to handle panics during execution. +func (s *CacheService) interceptPanic(ctx context.Context, request proto.Message) { + err := recover() + if err == nil { + return + } + + s.Metrics.PanicCounter.Inc() + logger.Fatalf(ctx, "panic-ed for request: [%+v] with err: %v with Stack: %v", request, err, string(debug.Stack())) +} + +func NewCacheServer(ctx context.Context, config runtimeInterfaces.Configuration, storageClient *storage.DataStore, + cacheScope promutils.Scope) *CacheService { + panicCounter := cacheScope.MustNewCounter("initialization_panic", + "panics encountered initializing the cache service") + + defer func() { + if err := recover(); err != nil { + panicCounter.Inc() + logger.Fatalf(ctx, fmt.Sprintf("caught panic: %v [%+v]", err, string(debug.Stack()))) + } + }() + + databaseConfig := config.ApplicationConfiguration().GetDbConfig() + logConfig := logger.GetConfig() + + db, err := repositories.GetDB(ctx, databaseConfig, logConfig) + if err != nil { + logger.Fatal(ctx, err) + } + dbScope := cacheScope.NewSubScope("database") + repo := repositories.NewGormRepo( + db, errors.NewPostgresErrorTransformer(cacheScope.NewSubScope("errors")), dbScope) + + // flyteadmin config/auth optionally used by datacatalog client (if enabled) + adminCfg := admin.GetConfig(ctx) + adminCredentialsFuture := admin.NewPerRPCCredentialsFuture() + adminAuthOpts := []grpc.DialOption{ + grpc.WithChainUnaryInterceptor(admin.NewAuthInterceptor(adminCfg, nil, adminCredentialsFuture, nil)), + grpc.WithPerRPCCredentials(adminCredentialsFuture), + } + + catalogClient, err := catalog.NewCatalogClient(ctx, adminAuthOpts...) + if err != nil { + logger.Fatal(ctx, err) + } + + cacheManager := manager.NewCacheManager(repo, config, catalogClient, cacheScope.NewSubScope("cache_manager")) + + logger.Info(ctx, "Initializing a new CacheService") + return &CacheService{ + CacheManager: cacheManager, + Metrics: InitMetrics(cacheScope), + } +} diff --git a/flyteadmin/pkg/rpc/cacheservice/cache.go b/flyteadmin/pkg/rpc/cacheservice/cache.go new file mode 100644 index 0000000000..bd844d9f67 --- /dev/null +++ b/flyteadmin/pkg/rpc/cacheservice/cache.go @@ -0,0 +1,40 @@ +package cacheservice + +import ( + "context" + + "google.golang.org/grpc/codes" + "google.golang.org/grpc/status" + + "github.com/flyteorg/flyte/flyteadmin/pkg/rpc/adminservice/util" + "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/core" + "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/service" + "github.com/flyteorg/flyte/flytestdlib/logger" +) + +func (s *CacheService) EvictTaskExecutionCache(ctx context.Context, req *service.EvictTaskExecutionCacheRequest) (*service.EvictCacheResponse, error) { + defer s.interceptPanic(ctx, req) + if req == nil { + return nil, status.Errorf(codes.InvalidArgument, "Incorrect request, nil requests not allowed") + } + + // Calling the HTTP endpoint implicitly carries the resource type information in the URL, but does not set it in the + // parsed protobuf message. Ensure task execution identifier is valid by manually setting task resource type below. + if req.TaskExecutionId != nil && req.TaskExecutionId.TaskId != nil && + req.TaskExecutionId.TaskId.ResourceType == core.ResourceType_UNSPECIFIED { + logger.Infof(ctx, "Adding task resource type for unspecified value in request: [%+v]", req) + req.TaskExecutionId.TaskId.ResourceType = core.ResourceType_TASK + } + + var resp *service.EvictCacheResponse + var err error + s.Metrics.cacheEndpointMetrics.evictTaskExecution.Time(func() { + resp, err = s.CacheManager.EvictTaskExecutionCache(ctx, *req) + }) + if err != nil { + return nil, util.TransformAndRecordError(err, &s.Metrics.cacheEndpointMetrics.evictTaskExecution) + } + s.Metrics.cacheEndpointMetrics.evictTaskExecution.Success() + + return resp, nil +} diff --git a/flyteadmin/pkg/rpc/cacheservice/metrics.go b/flyteadmin/pkg/rpc/cacheservice/metrics.go new file mode 100644 index 0000000000..d35f8b6d42 --- /dev/null +++ b/flyteadmin/pkg/rpc/cacheservice/metrics.go @@ -0,0 +1,36 @@ +package cacheservice + +import ( + "github.com/prometheus/client_golang/prometheus" + + "github.com/flyteorg/flyte/flyteadmin/pkg/rpc/adminservice/util" + "github.com/flyteorg/flyte/flytestdlib/promutils" +) + +type cacheEndpointMetrics struct { + scope promutils.Scope + + evictExecution util.RequestMetrics + evictTaskExecution util.RequestMetrics +} + +type CacheMetrics struct { + Scope promutils.Scope + PanicCounter prometheus.Counter + + cacheEndpointMetrics cacheEndpointMetrics +} + +func InitMetrics(cacheScope promutils.Scope) CacheMetrics { + return CacheMetrics{ + Scope: cacheScope, + PanicCounter: cacheScope.MustNewCounter("handler_panic", + "panics encountered while handling requests to the cache service"), + + cacheEndpointMetrics: cacheEndpointMetrics{ + scope: cacheScope, + evictExecution: util.NewRequestMetrics(cacheScope, "evict_execution"), + evictTaskExecution: util.NewRequestMetrics(cacheScope, "evict_task_execution"), + }, + } +} diff --git a/flyteadmin/pkg/server/service.go b/flyteadmin/pkg/server/service.go index d51f1c4f31..5041b77785 100644 --- a/flyteadmin/pkg/server/service.go +++ b/flyteadmin/pkg/server/service.go @@ -35,6 +35,7 @@ import ( "github.com/flyteorg/flyte/flyteadmin/pkg/config" "github.com/flyteorg/flyte/flyteadmin/pkg/rpc" "github.com/flyteorg/flyte/flyteadmin/pkg/rpc/adminservice" + "github.com/flyteorg/flyte/flyteadmin/pkg/rpc/cacheservice" runtime2 "github.com/flyteorg/flyte/flyteadmin/pkg/runtime" runtimeIfaces "github.com/flyteorg/flyte/flyteadmin/pkg/runtime/interfaces" "github.com/flyteorg/flyte/flyteadmin/plugins" @@ -148,6 +149,8 @@ func newGRPCServer(ctx context.Context, pluginRegistry *plugins.Registry, cfg *c grpcService.RegisterSignalServiceServer(grpcServer, rpc.NewSignalServer(ctx, configuration, scope.NewSubScope("signal"))) + grpcService.RegisterCacheServiceServer(grpcServer, cacheservice.NewCacheServer(ctx, configuration, dataStorageClient, scope.NewSubScope("cache"))) + additionalService := plugins.Get[common.RegisterAdditionalGRPCService](pluginRegistry, plugins.PluginIDAdditionalGRPCService) if additionalService != nil { if err := additionalService(ctx, grpcServer); err != nil { @@ -262,6 +265,11 @@ func newHTTPServer(ctx context.Context, pluginRegistry *plugins.Registry, cfg *c return nil, errors.Wrap(err, "error registering signal service") } + err = service.RegisterCacheServiceHandlerFromEndpoint(ctx, gwmux, grpcAddress, grpcConnectionOpts) + if err != nil { + return nil, errors.Wrap(err, "error registering cache service") + } + mux.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) { ctx := GetOrGenerateRequestIDForRequest(r) gwmux.ServeHTTP(w, r.WithContext(ctx)) diff --git a/flytecopilot/go.mod b/flytecopilot/go.mod index de6c77795c..bf26de824a 100644 --- a/flytecopilot/go.mod +++ b/flytecopilot/go.mod @@ -14,9 +14,9 @@ require ( github.com/spf13/cobra v1.7.0 github.com/spf13/pflag v1.0.5 github.com/stretchr/testify v1.8.4 - k8s.io/api v0.28.2 - k8s.io/apimachinery v0.28.2 - k8s.io/client-go v0.28.1 + k8s.io/api v0.28.3 + k8s.io/apimachinery v0.28.3 + k8s.io/client-go v0.28.3 k8s.io/klog v1.0.0 ) @@ -25,7 +25,7 @@ require ( cloud.google.com/go/compute v1.19.1 // indirect cloud.google.com/go/compute/metadata v0.2.3 // indirect cloud.google.com/go/iam v0.13.0 // indirect - cloud.google.com/go/storage v1.28.1 // indirect + cloud.google.com/go/storage v1.29.0 // indirect github.com/Azure/azure-sdk-for-go/sdk/azcore v1.7.2 // indirect github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.3.1 // indirect github.com/Azure/azure-sdk-for-go/sdk/internal v1.3.0 // indirect @@ -36,7 +36,7 @@ require ( github.com/cespare/xxhash/v2 v2.2.0 // indirect github.com/coocood/freecache v1.1.1 // indirect github.com/davecgh/go-spew v1.1.1 // indirect - github.com/emicklei/go-restful/v3 v3.9.0 // indirect + github.com/emicklei/go-restful/v3 v3.11.0 // indirect github.com/evanphx/json-patch/v5 v5.6.0 // indirect github.com/fatih/color v1.13.0 // indirect github.com/flyteorg/stow v0.3.10 // indirect @@ -64,7 +64,7 @@ require ( github.com/magiconair/properties v1.8.6 // indirect github.com/mailru/easyjson v0.7.7 // indirect github.com/mattn/go-colorable v0.1.12 // indirect - github.com/mattn/go-isatty v0.0.14 // indirect + github.com/mattn/go-isatty v0.0.16 // indirect github.com/matttproud/golang_protobuf_extensions v1.0.4 // indirect github.com/mitchellh/mapstructure v1.5.0 // indirect github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect @@ -79,7 +79,7 @@ require ( github.com/prometheus/client_model v0.4.0 // indirect github.com/prometheus/common v0.44.0 // indirect github.com/prometheus/procfs v0.10.1 // indirect - github.com/sirupsen/logrus v1.7.0 // indirect + github.com/sirupsen/logrus v1.9.3 // indirect github.com/spf13/afero v1.9.2 // indirect github.com/spf13/cast v1.4.1 // indirect github.com/spf13/jwalterweatherman v1.1.0 // indirect @@ -92,12 +92,12 @@ require ( go.opentelemetry.io/otel/metric v1.19.0 // indirect go.opentelemetry.io/otel/sdk v1.19.0 // indirect go.opentelemetry.io/otel/trace v1.19.0 // indirect - golang.org/x/crypto v0.13.0 // indirect - golang.org/x/exp v0.0.0-20220722155223-a9213eeb770e // indirect - golang.org/x/net v0.15.0 // indirect + golang.org/x/crypto v0.14.0 // indirect + golang.org/x/exp v0.0.0-20231005195138-3e424a577f31 // indirect + golang.org/x/net v0.17.0 // indirect golang.org/x/oauth2 v0.8.0 // indirect - golang.org/x/sys v0.12.0 // indirect - golang.org/x/term v0.12.0 // indirect + golang.org/x/sys v0.13.0 // indirect + golang.org/x/term v0.13.0 // indirect golang.org/x/text v0.13.0 // indirect golang.org/x/time v0.3.0 // indirect golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2 // indirect @@ -115,7 +115,7 @@ require ( k8s.io/klog/v2 v2.100.1 // indirect k8s.io/kube-openapi v0.0.0-20230717233707-2695361300d9 // indirect k8s.io/utils v0.0.0-20230406110748-d93618cff8a2 // indirect - sigs.k8s.io/controller-runtime v0.0.0-00010101000000-000000000000 // indirect + sigs.k8s.io/controller-runtime v0.16.3 // indirect sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect sigs.k8s.io/structured-merge-diff/v4 v4.2.3 // indirect sigs.k8s.io/yaml v1.3.0 // indirect diff --git a/flytecopilot/go.sum b/flytecopilot/go.sum index 061cd63e87..247f03044c 100644 --- a/flytecopilot/go.sum +++ b/flytecopilot/go.sum @@ -45,8 +45,8 @@ cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohl cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs= cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0= cloud.google.com/go/storage v1.14.0/go.mod h1:GrKmX003DSIwi9o29oFT7YDnHYwZoctc3fOKtUw0Xmo= -cloud.google.com/go/storage v1.28.1 h1:F5QDG5ChchaAVQhINh24U99OWHURqrW8OmQcGKXcbgI= -cloud.google.com/go/storage v1.28.1/go.mod h1:Qnisd4CqDdo6BGs2AD5LLnEsmSQ80wQ5ogcBBKhU86Y= +cloud.google.com/go/storage v1.29.0 h1:6weCgzRvMg7lzuUurI4697AqIRPU1SvzHhynwpW31jI= +cloud.google.com/go/storage v1.29.0/go.mod h1:4puEjyTKnku6gfKoTfNOU/W+a9JyuVNxjpS5GBrB8h4= dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= github.com/Azure/azure-sdk-for-go/sdk/azcore v1.7.2 h1:t5+QXLCK9SVi0PPdaY0PrFvYUo24KwA0QwxnaHRSVd4= github.com/Azure/azure-sdk-for-go/sdk/azcore v1.7.2/go.mod h1:bjGvMhVMb+EEm3VRNQawDMUyMMjo+S5ewNjflkep/0Q= @@ -91,8 +91,8 @@ 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/emicklei/go-restful/v3 v3.9.0 h1:XwGDlfxEnQZzuopoqxwSEllNcCOM9DhhFyhFIIGKwxE= -github.com/emicklei/go-restful/v3 v3.9.0/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRry+4bhvbpWn3mrbc= +github.com/emicklei/go-restful/v3 v3.11.0 h1:rAQeMHw1c7zTmncogyy8VvRZwtkmkZ4FxERmMY4rD+g= +github.com/emicklei/go-restful/v3 v3.11.0/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRry+4bhvbpWn3mrbc= github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= @@ -256,8 +256,9 @@ github.com/mattn/go-colorable v0.1.9/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope github.com/mattn/go-colorable v0.1.12 h1:jF+Du6AlPIjs2BiUiQlKOX0rt3SujHxPnksPKZbaA40= github.com/mattn/go-colorable v0.1.12/go.mod h1:u5H1YNBxpqRaxsYJYSkiCWKzEfiAb1Gb520KVy5xxl4= github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= -github.com/mattn/go-isatty v0.0.14 h1:yVuAays6BHfxijgZPzw+3Zlu5yQgKGP2/hcQbHb7S9Y= github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94= +github.com/mattn/go-isatty v0.0.16 h1:bq3VjFmv/sOjHtdEhmkEV4x1AJtvUvOJ2PFAZ5+peKQ= +github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= github.com/matttproud/golang_protobuf_extensions v1.0.4 h1:mmDVorXM7PCGKw94cs5zkfA9PSy5pEvNWRP0ET0TIVo= github.com/matttproud/golang_protobuf_extensions v1.0.4/go.mod h1:BSXmuO+STAnVfrANrmjBb36TMTDstsz7MSK+HVaYKv4= github.com/mitchellh/go-ps v1.0.0 h1:i6ampVEEF4wQFF+bkYfwYgY+F/uYJDktmvLPf7qIgjc= @@ -302,8 +303,8 @@ github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFR github.com/rogpeppe/go-internal v1.11.0 h1:cWPaGQEPrBb5/AsnsZesgZZ9yb1OQ+GOISoDNXVBh4M= github.com/rogpeppe/go-internal v1.11.0/go.mod h1:ddIwULY96R17DhadqLgMfk9H9tvdUzkipdSkR5nkCZA= github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= -github.com/sirupsen/logrus v1.7.0 h1:ShrD1U9pZB12TX0cVy0DtePoCH97K8EtX+mg7ZARUtM= -github.com/sirupsen/logrus v1.7.0/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= +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.9.2 h1:j49Hj62F0n+DaZ1dDCvhABaPNSGNkt32oRFxI33IEMw= @@ -369,8 +370,8 @@ golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8U golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20210421170649-83a5a9bb288b/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= golang.org/x/crypto v0.0.0-20211108221036-ceb1ce70b4fa/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= -golang.org/x/crypto v0.13.0 h1:mvySKfSWJ+UKUii46M40LOvyWfN0s2U+46/jDd0e6Ck= -golang.org/x/crypto v0.13.0/go.mod h1:y6Z2r+Rw4iayiXXAIxJIDAJ1zMW4yaTpebo8fPOliYc= +golang.org/x/crypto v0.14.0 h1:wBqGXzWJW6m1XrIKlAH0Hs1JJ7+9KBwnIO8v66Q9cHc= +golang.org/x/crypto v0.14.0/go.mod h1:MVFd36DqK4CsrnJYDkBA3VC4m2GkXAM0PvzMCn4JQf4= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= @@ -381,8 +382,8 @@ golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u0 golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM= golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU= -golang.org/x/exp v0.0.0-20220722155223-a9213eeb770e h1:+WEEuIdZHnUeJJmEUjyYC2gfUMj69yZXw17EnHg/otA= -golang.org/x/exp v0.0.0-20220722155223-a9213eeb770e/go.mod h1:Kr81I6Kryrl9sr8s2FK3vxD90NdsKWRuOIl2O4CvYbA= +golang.org/x/exp v0.0.0-20231005195138-3e424a577f31 h1:9k5exFQKQglLo+RoP+4zMjOFE14P6+vyR0baDAi0Rcs= +golang.org/x/exp v0.0.0-20231005195138-3e424a577f31/go.mod h1:S2oDrQGGwySpoQPVqRShND87VCbxmc6bL1Yd2oYrm6k= golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= @@ -439,8 +440,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-20220127200216-cd36cc0744dd/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= -golang.org/x/net v0.15.0 h1:ugBLEUaxABaB5AJqW9enI0ACdci2RUd4eP51NTBvuJ8= -golang.org/x/net v0.15.0/go.mod h1:idbUs1IY1+zTqbi8yxTbhexhEEk5ur9LInksu6HrEpk= +golang.org/x/net v0.17.0 h1:pVaXccu2ozPjCXewfr1S7xza/zcXTity9cCdXQYSjIM= +golang.org/x/net v0.17.0/go.mod h1:NxSsAGuq816PNPmqtQdLE42eU2Fs7NoRIZrHJAlaCOE= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -472,7 +473,6 @@ golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191001151750-bb3f8db39f24/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191228213918-04cbcbbfeed8/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200113162924-86b910548bc1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -502,13 +502,15 @@ golang.org/x/sys v0.0.0-20210616045830-e2b7044e8c71/go.mod h1:oPkhp1MJrh7nUepCBc 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-20211216021012-1d35b9e2eb4e/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-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.12.0 h1:CM0HF96J0hcLAwsHPJZjfdNzs0gftsLfgKt57wWHJ0o= -golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.13.0 h1:Af8nKPmuFypiUBjVoU9V20FiaFXOcuZI21p0ycVYYGE= +golang.org/x/sys v0.13.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= 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.12.0 h1:/ZfYdc3zq+q02Rv9vGqTeSItdzZTSNDmfTi0mBAuidU= -golang.org/x/term v0.12.0/go.mod h1:owVbMEjm3cBLCHdkQu9b1opXd4ETQWc3BhuQGKgXgvU= +golang.org/x/term v0.13.0 h1:bb+I9cTfFazGW51MZqBVmZy7+JEJMouUHTUSKVQLBek= +golang.org/x/term v0.13.0/go.mod h1:LTmsnFJwVN6bCy1rVCoS+qHT1HhALEFxKncY3WNNh4U= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -572,8 +574,8 @@ 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.9.3 h1:Gn1I8+64MsuTb/HpH+LmQtNas23LhUVr3rYZ0eKuaMM= -golang.org/x/tools v0.9.3/go.mod h1:owI94Op576fPu3cIGQeHs3joujW/2Oc6MtlxbF5dfNc= +golang.org/x/tools v0.13.0 h1:Iey4qkscZuv0VvIt8E0neZjtPVQFSc870HQ448QgEmQ= +golang.org/x/tools v0.13.0/go.mod h1:HvlwmtVNQAhOuCjW7xxvovg8wbNq7LwfXh/k7wXUl58= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= diff --git a/flyteidl/clients/go/admin/mocks/CacheServiceClient.go b/flyteidl/clients/go/admin/mocks/CacheServiceClient.go new file mode 100644 index 0000000000..d5f140bd1e --- /dev/null +++ b/flyteidl/clients/go/admin/mocks/CacheServiceClient.go @@ -0,0 +1,66 @@ +// Code generated by mockery v1.0.1. DO NOT EDIT. + +package mocks + +import ( + context "context" + + grpc "google.golang.org/grpc" + + mock "github.com/stretchr/testify/mock" + + service "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/service" +) + +// CacheServiceClient is an autogenerated mock type for the CacheServiceClient type +type CacheServiceClient struct { + mock.Mock +} + +type CacheServiceClient_EvictTaskExecutionCache struct { + *mock.Call +} + +func (_m CacheServiceClient_EvictTaskExecutionCache) Return(_a0 *service.EvictCacheResponse, _a1 error) *CacheServiceClient_EvictTaskExecutionCache { + return &CacheServiceClient_EvictTaskExecutionCache{Call: _m.Call.Return(_a0, _a1)} +} + +func (_m *CacheServiceClient) OnEvictTaskExecutionCache(ctx context.Context, in *service.EvictTaskExecutionCacheRequest, opts ...grpc.CallOption) *CacheServiceClient_EvictTaskExecutionCache { + c_call := _m.On("EvictTaskExecutionCache", ctx, in, opts) + return &CacheServiceClient_EvictTaskExecutionCache{Call: c_call} +} + +func (_m *CacheServiceClient) OnEvictTaskExecutionCacheMatch(matchers ...interface{}) *CacheServiceClient_EvictTaskExecutionCache { + c_call := _m.On("EvictTaskExecutionCache", matchers...) + return &CacheServiceClient_EvictTaskExecutionCache{Call: c_call} +} + +// EvictTaskExecutionCache provides a mock function with given fields: ctx, in, opts +func (_m *CacheServiceClient) EvictTaskExecutionCache(ctx context.Context, in *service.EvictTaskExecutionCacheRequest, opts ...grpc.CallOption) (*service.EvictCacheResponse, error) { + _va := make([]interface{}, len(opts)) + for _i := range opts { + _va[_i] = opts[_i] + } + var _ca []interface{} + _ca = append(_ca, ctx, in) + _ca = append(_ca, _va...) + ret := _m.Called(_ca...) + + var r0 *service.EvictCacheResponse + if rf, ok := ret.Get(0).(func(context.Context, *service.EvictTaskExecutionCacheRequest, ...grpc.CallOption) *service.EvictCacheResponse); ok { + r0 = rf(ctx, in, opts...) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*service.EvictCacheResponse) + } + } + + var r1 error + if rf, ok := ret.Get(1).(func(context.Context, *service.EvictTaskExecutionCacheRequest, ...grpc.CallOption) error); ok { + r1 = rf(ctx, in, opts...) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} diff --git a/flyteidl/clients/go/admin/mocks/CacheServiceServer.go b/flyteidl/clients/go/admin/mocks/CacheServiceServer.go new file mode 100644 index 0000000000..175eb1d3a8 --- /dev/null +++ b/flyteidl/clients/go/admin/mocks/CacheServiceServer.go @@ -0,0 +1,56 @@ +// Code generated by mockery v1.0.1. DO NOT EDIT. + +package mocks + +import ( + context "context" + + service "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/service" + mock "github.com/stretchr/testify/mock" +) + +// CacheServiceServer is an autogenerated mock type for the CacheServiceServer type +type CacheServiceServer struct { + mock.Mock +} + +type CacheServiceServer_EvictTaskExecutionCache struct { + *mock.Call +} + +func (_m CacheServiceServer_EvictTaskExecutionCache) Return(_a0 *service.EvictCacheResponse, _a1 error) *CacheServiceServer_EvictTaskExecutionCache { + return &CacheServiceServer_EvictTaskExecutionCache{Call: _m.Call.Return(_a0, _a1)} +} + +func (_m *CacheServiceServer) OnEvictTaskExecutionCache(_a0 context.Context, _a1 *service.EvictTaskExecutionCacheRequest) *CacheServiceServer_EvictTaskExecutionCache { + c_call := _m.On("EvictTaskExecutionCache", _a0, _a1) + return &CacheServiceServer_EvictTaskExecutionCache{Call: c_call} +} + +func (_m *CacheServiceServer) OnEvictTaskExecutionCacheMatch(matchers ...interface{}) *CacheServiceServer_EvictTaskExecutionCache { + c_call := _m.On("EvictTaskExecutionCache", matchers...) + return &CacheServiceServer_EvictTaskExecutionCache{Call: c_call} +} + +// EvictTaskExecutionCache provides a mock function with given fields: _a0, _a1 +func (_m *CacheServiceServer) EvictTaskExecutionCache(_a0 context.Context, _a1 *service.EvictTaskExecutionCacheRequest) (*service.EvictCacheResponse, error) { + ret := _m.Called(_a0, _a1) + + var r0 *service.EvictCacheResponse + if rf, ok := ret.Get(0).(func(context.Context, *service.EvictTaskExecutionCacheRequest) *service.EvictCacheResponse); ok { + r0 = rf(_a0, _a1) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*service.EvictCacheResponse) + } + } + + var r1 error + if rf, ok := ret.Get(1).(func(context.Context, *service.EvictTaskExecutionCacheRequest) error); ok { + r1 = rf(_a0, _a1) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} diff --git a/flyteidl/clients/go/admin/mocks/UnsafeCacheServiceServer.go b/flyteidl/clients/go/admin/mocks/UnsafeCacheServiceServer.go new file mode 100644 index 0000000000..fdaeccb237 --- /dev/null +++ b/flyteidl/clients/go/admin/mocks/UnsafeCacheServiceServer.go @@ -0,0 +1,15 @@ +// Code generated by mockery v1.0.1. DO NOT EDIT. + +package mocks + +import mock "github.com/stretchr/testify/mock" + +// UnsafeCacheServiceServer is an autogenerated mock type for the UnsafeCacheServiceServer type +type UnsafeCacheServiceServer struct { + mock.Mock +} + +// mustEmbedUnimplementedCacheServiceServer provides a mock function with given fields: +func (_m *UnsafeCacheServiceServer) mustEmbedUnimplementedCacheServiceServer() { + _m.Called() +} diff --git a/flyteidl/clients/go/admin/mocks/isEvictCacheRequest_Id.go b/flyteidl/clients/go/admin/mocks/isEvictCacheRequest_Id.go new file mode 100644 index 0000000000..601036a404 --- /dev/null +++ b/flyteidl/clients/go/admin/mocks/isEvictCacheRequest_Id.go @@ -0,0 +1,15 @@ +// Code generated by mockery v1.0.1. DO NOT EDIT. + +package mocks + +import mock "github.com/stretchr/testify/mock" + +// isEvictCacheRequest_Id is an autogenerated mock type for the isEvictCacheRequest_Id type +type isEvictCacheRequest_Id struct { + mock.Mock +} + +// isEvictCacheRequest_Id provides a mock function with given fields: +func (_m *isEvictCacheRequest_Id) isEvictCacheRequest_Id() { + _m.Called() +} diff --git a/flyteidl/clients/go/datacatalog/mocks/DataCatalogClient.go b/flyteidl/clients/go/datacatalog/mocks/DataCatalogClient.go index 44e8b9c6fa..1a9a449456 100644 --- a/flyteidl/clients/go/datacatalog/mocks/DataCatalogClient.go +++ b/flyteidl/clients/go/datacatalog/mocks/DataCatalogClient.go @@ -160,6 +160,54 @@ func (_m *DataCatalogClient) CreateDataset(ctx context.Context, in *datacatalog. return r0, r1 } +type DataCatalogClient_DeleteArtifact struct { + *mock.Call +} + +func (_m DataCatalogClient_DeleteArtifact) Return(_a0 *datacatalog.DeleteArtifactResponse, _a1 error) *DataCatalogClient_DeleteArtifact { + return &DataCatalogClient_DeleteArtifact{Call: _m.Call.Return(_a0, _a1)} +} + +func (_m *DataCatalogClient) OnDeleteArtifact(ctx context.Context, in *datacatalog.DeleteArtifactRequest, opts ...grpc.CallOption) *DataCatalogClient_DeleteArtifact { + c_call := _m.On("DeleteArtifact", ctx, in, opts) + return &DataCatalogClient_DeleteArtifact{Call: c_call} +} + +func (_m *DataCatalogClient) OnDeleteArtifactMatch(matchers ...interface{}) *DataCatalogClient_DeleteArtifact { + c_call := _m.On("DeleteArtifact", matchers...) + return &DataCatalogClient_DeleteArtifact{Call: c_call} +} + +// DeleteArtifact provides a mock function with given fields: ctx, in, opts +func (_m *DataCatalogClient) DeleteArtifact(ctx context.Context, in *datacatalog.DeleteArtifactRequest, opts ...grpc.CallOption) (*datacatalog.DeleteArtifactResponse, error) { + _va := make([]interface{}, len(opts)) + for _i := range opts { + _va[_i] = opts[_i] + } + var _ca []interface{} + _ca = append(_ca, ctx, in) + _ca = append(_ca, _va...) + ret := _m.Called(_ca...) + + var r0 *datacatalog.DeleteArtifactResponse + if rf, ok := ret.Get(0).(func(context.Context, *datacatalog.DeleteArtifactRequest, ...grpc.CallOption) *datacatalog.DeleteArtifactResponse); ok { + r0 = rf(ctx, in, opts...) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*datacatalog.DeleteArtifactResponse) + } + } + + var r1 error + if rf, ok := ret.Get(1).(func(context.Context, *datacatalog.DeleteArtifactRequest, ...grpc.CallOption) error); ok { + r1 = rf(ctx, in, opts...) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + type DataCatalogClient_GetArtifact struct { *mock.Call } diff --git a/flyteidl/gen/pb-es/flyteidl/core/errors_pb.ts b/flyteidl/gen/pb-es/flyteidl/core/errors_pb.ts index 42b70dec5b..c324c9c51a 100644 --- a/flyteidl/gen/pb-es/flyteidl/core/errors_pb.ts +++ b/flyteidl/gen/pb-es/flyteidl/core/errors_pb.ts @@ -6,6 +6,7 @@ import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, PartialMessage, PlainMessage } from "@bufbuild/protobuf"; import { Message, proto3 } from "@bufbuild/protobuf"; import { ExecutionError_ErrorKind } from "./execution_pb.js"; +import { NodeExecutionIdentifier, TaskExecutionIdentifier, WorkflowExecutionIdentifier } from "./identifier_pb.js"; /** * Error message to propagate detailed errors from container executions to the execution @@ -137,3 +138,174 @@ export class ErrorDocument extends Message { } } +/** + * Error returned if eviction of cached output fails and should be re-tried by the user. + * + * @generated from message flyteidl.core.CacheEvictionError + */ +export class CacheEvictionError extends Message { + /** + * Error code to match type of cache eviction error encountered. + * + * @generated from field: flyteidl.core.CacheEvictionError.Code code = 1; + */ + code = CacheEvictionError_Code.INTERNAL; + + /** + * More detailed error message explaining the reason for the cache eviction failure. + * + * @generated from field: string message = 2; + */ + message = ""; + + /** + * ID of the node execution the cache eviction failed for. + * + * @generated from field: flyteidl.core.NodeExecutionIdentifier node_execution_id = 3; + */ + nodeExecutionId?: NodeExecutionIdentifier; + + /** + * Source of the node execution. + * + * @generated from oneof flyteidl.core.CacheEvictionError.source + */ + source: { + /** + * ID of the task execution the cache eviction failed for (if the node execution was part of a task execution). + * + * @generated from field: flyteidl.core.TaskExecutionIdentifier task_execution_id = 4; + */ + value: TaskExecutionIdentifier; + case: "taskExecutionId"; + } | { + /** + * ID of the workflow execution the cache eviction failed for (if the node execution was part of a workflow execution). + * + * @generated from field: flyteidl.core.WorkflowExecutionIdentifier workflow_execution_id = 5; + */ + value: WorkflowExecutionIdentifier; + case: "workflowExecutionId"; + } | { case: undefined; value?: undefined } = { case: undefined }; + + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } + + static readonly runtime: typeof proto3 = proto3; + static readonly typeName = "flyteidl.core.CacheEvictionError"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + { no: 1, name: "code", kind: "enum", T: proto3.getEnumType(CacheEvictionError_Code) }, + { no: 2, name: "message", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 3, name: "node_execution_id", kind: "message", T: NodeExecutionIdentifier }, + { no: 4, name: "task_execution_id", kind: "message", T: TaskExecutionIdentifier, oneof: "source" }, + { no: 5, name: "workflow_execution_id", kind: "message", T: WorkflowExecutionIdentifier, oneof: "source" }, + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): CacheEvictionError { + return new CacheEvictionError().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): CacheEvictionError { + return new CacheEvictionError().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): CacheEvictionError { + return new CacheEvictionError().fromJsonString(jsonString, options); + } + + static equals(a: CacheEvictionError | PlainMessage | undefined, b: CacheEvictionError | PlainMessage | undefined): boolean { + return proto3.util.equals(CacheEvictionError, a, b); + } +} + +/** + * Defines codes for distinguishing between errors encountered during cache eviction. + * + * @generated from enum flyteidl.core.CacheEvictionError.Code + */ +export enum CacheEvictionError_Code { + /** + * Indicates a generic internal error occurred. + * + * @generated from enum value: INTERNAL = 0; + */ + INTERNAL = 0, + + /** + * Indicates no reservation could be acquired before deleting an artifact. + * + * @generated from enum value: RESERVATION_NOT_ACQUIRED = 1; + */ + RESERVATION_NOT_ACQUIRED = 1, + + /** + * Indicates updating the database entry related to the node execution failed. + * + * @generated from enum value: DATABASE_UPDATE_FAILED = 2; + */ + DATABASE_UPDATE_FAILED = 2, + + /** + * Indicates deleting the artifact from datacatalog failed. + * + * @generated from enum value: ARTIFACT_DELETE_FAILED = 3; + */ + ARTIFACT_DELETE_FAILED = 3, + + /** + * Indicates the reservation previously acquired could not be released for an artifact. + * + * @generated from enum value: RESERVATION_NOT_RELEASED = 4; + */ + RESERVATION_NOT_RELEASED = 4, +} +// Retrieve enum metadata with: proto3.getEnumType(CacheEvictionError_Code) +proto3.util.setEnumType(CacheEvictionError_Code, "flyteidl.core.CacheEvictionError.Code", [ + { no: 0, name: "INTERNAL" }, + { no: 1, name: "RESERVATION_NOT_ACQUIRED" }, + { no: 2, name: "DATABASE_UPDATE_FAILED" }, + { no: 3, name: "ARTIFACT_DELETE_FAILED" }, + { no: 4, name: "RESERVATION_NOT_RELEASED" }, +]); + +/** + * List of :ref:`ref_flyteidl.core.CacheEvictionError` encountered during a cache eviction request. + * + * @generated from message flyteidl.core.CacheEvictionErrorList + */ +export class CacheEvictionErrorList extends Message { + /** + * @generated from field: repeated flyteidl.core.CacheEvictionError errors = 1; + */ + errors: CacheEvictionError[] = []; + + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } + + static readonly runtime: typeof proto3 = proto3; + static readonly typeName = "flyteidl.core.CacheEvictionErrorList"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + { no: 1, name: "errors", kind: "message", T: CacheEvictionError, repeated: true }, + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): CacheEvictionErrorList { + return new CacheEvictionErrorList().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): CacheEvictionErrorList { + return new CacheEvictionErrorList().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): CacheEvictionErrorList { + return new CacheEvictionErrorList().fromJsonString(jsonString, options); + } + + static equals(a: CacheEvictionErrorList | PlainMessage | undefined, b: CacheEvictionErrorList | PlainMessage | undefined): boolean { + return proto3.util.equals(CacheEvictionErrorList, a, b); + } +} + diff --git a/flyteidl/gen/pb-es/flyteidl/datacatalog/datacatalog_connect.ts b/flyteidl/gen/pb-es/flyteidl/datacatalog/datacatalog_connect.ts index 932436b45d..ffaaa51b9d 100644 --- a/flyteidl/gen/pb-es/flyteidl/datacatalog/datacatalog_connect.ts +++ b/flyteidl/gen/pb-es/flyteidl/datacatalog/datacatalog_connect.ts @@ -3,7 +3,7 @@ /* eslint-disable */ // @ts-nocheck -import { AddTagRequest, AddTagResponse, CreateArtifactRequest, CreateArtifactResponse, CreateDatasetRequest, CreateDatasetResponse, GetArtifactRequest, GetArtifactResponse, GetDatasetRequest, GetDatasetResponse, GetOrExtendReservationRequest, GetOrExtendReservationResponse, ListArtifactsRequest, ListArtifactsResponse, ListDatasetsRequest, ListDatasetsResponse, ReleaseReservationRequest, ReleaseReservationResponse, UpdateArtifactRequest, UpdateArtifactResponse } from "./datacatalog_pb.js"; +import { AddTagRequest, AddTagResponse, CreateArtifactRequest, CreateArtifactResponse, CreateDatasetRequest, CreateDatasetResponse, DeleteArtifactRequest, DeleteArtifactResponse, GetArtifactRequest, GetArtifactResponse, GetDatasetRequest, GetDatasetResponse, GetOrExtendReservationRequest, GetOrExtendReservationResponse, ListArtifactsRequest, ListArtifactsResponse, ListDatasetsRequest, ListDatasetsResponse, ReleaseReservationRequest, ReleaseReservationResponse, UpdateArtifactRequest, UpdateArtifactResponse } from "./datacatalog_pb.js"; import { MethodKind } from "@bufbuild/protobuf"; /** @@ -107,6 +107,17 @@ export const DataCatalog = { O: UpdateArtifactResponse, kind: MethodKind.Unary, }, + /** + * Deletes an existing artifact, removing the stored artifact data from the underlying blob storage. + * + * @generated from rpc datacatalog.DataCatalog.DeleteArtifact + */ + deleteArtifact: { + name: "DeleteArtifact", + I: DeleteArtifactRequest, + O: DeleteArtifactResponse, + kind: MethodKind.Unary, + }, /** * Attempts to get or extend a reservation for the corresponding artifact. If one already exists * (ie. another entity owns the reservation) then that reservation is retrieved. diff --git a/flyteidl/gen/pb-es/flyteidl/datacatalog/datacatalog_pb.ts b/flyteidl/gen/pb-es/flyteidl/datacatalog/datacatalog_pb.ts index 4e1cb2ed41..eefbfe4172 100644 --- a/flyteidl/gen/pb-es/flyteidl/datacatalog/datacatalog_pb.ts +++ b/flyteidl/gen/pb-es/flyteidl/datacatalog/datacatalog_pb.ts @@ -739,6 +739,103 @@ export class UpdateArtifactResponse extends Message { } } +/** + * + * Request message for deleting an Artifact and its associated ArtifactData. + * + * @generated from message datacatalog.DeleteArtifactRequest + */ +export class DeleteArtifactRequest extends Message { + /** + * ID of dataset the artifact is associated with + * + * @generated from field: datacatalog.DatasetID dataset = 1; + */ + dataset?: DatasetID; + + /** + * Either ID of artifact or name of tag of existing artifact + * + * @generated from oneof datacatalog.DeleteArtifactRequest.query_handle + */ + queryHandle: { + /** + * @generated from field: string artifact_id = 2; + */ + value: string; + case: "artifactId"; + } | { + /** + * @generated from field: string tag_name = 3; + */ + value: string; + case: "tagName"; + } | { case: undefined; value?: undefined } = { case: undefined }; + + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } + + static readonly runtime: typeof proto3 = proto3; + static readonly typeName = "datacatalog.DeleteArtifactRequest"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + { no: 1, name: "dataset", kind: "message", T: DatasetID }, + { no: 2, name: "artifact_id", kind: "scalar", T: 9 /* ScalarType.STRING */, oneof: "query_handle" }, + { no: 3, name: "tag_name", kind: "scalar", T: 9 /* ScalarType.STRING */, oneof: "query_handle" }, + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): DeleteArtifactRequest { + return new DeleteArtifactRequest().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): DeleteArtifactRequest { + return new DeleteArtifactRequest().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): DeleteArtifactRequest { + return new DeleteArtifactRequest().fromJsonString(jsonString, options); + } + + static equals(a: DeleteArtifactRequest | PlainMessage | undefined, b: DeleteArtifactRequest | PlainMessage | undefined): boolean { + return proto3.util.equals(DeleteArtifactRequest, a, b); + } +} + +/** + * + * Response message for deleting an Artifact. + * + * @generated from message datacatalog.DeleteArtifactResponse + */ +export class DeleteArtifactResponse extends Message { + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } + + static readonly runtime: typeof proto3 = proto3; + static readonly typeName = "datacatalog.DeleteArtifactResponse"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): DeleteArtifactResponse { + return new DeleteArtifactResponse().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): DeleteArtifactResponse { + return new DeleteArtifactResponse().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): DeleteArtifactResponse { + return new DeleteArtifactResponse().fromJsonString(jsonString, options); + } + + static equals(a: DeleteArtifactResponse | PlainMessage | undefined, b: DeleteArtifactResponse | PlainMessage | undefined): boolean { + return proto3.util.equals(DeleteArtifactResponse, a, b); + } +} + /** * * ReservationID message that is composed of several string fields. diff --git a/flyteidl/gen/pb-es/flyteidl/service/cache_connect.ts b/flyteidl/gen/pb-es/flyteidl/service/cache_connect.ts new file mode 100644 index 0000000000..1c071f35dd --- /dev/null +++ b/flyteidl/gen/pb-es/flyteidl/service/cache_connect.ts @@ -0,0 +1,30 @@ +// @generated by protoc-gen-connect-es v1.3.0 with parameter "target=ts" +// @generated from file flyteidl/service/cache.proto (package flyteidl.service, syntax proto3) +/* eslint-disable */ +// @ts-nocheck + +import { EvictCacheResponse, EvictTaskExecutionCacheRequest } from "./cache_pb.js"; +import { MethodKind } from "@bufbuild/protobuf"; + +/** + * CacheService defines an RPC Service for interacting with cached data in Flyte on a high level basis. + * + * @generated from service flyteidl.service.CacheService + */ +export const CacheService = { + typeName: "flyteidl.service.CacheService", + methods: { + /** + * Evicts all cached data for the referenced :ref:`ref_flyteidl.admin.TaskExecution`. + * + * @generated from rpc flyteidl.service.CacheService.EvictTaskExecutionCache + */ + evictTaskExecutionCache: { + name: "EvictTaskExecutionCache", + I: EvictTaskExecutionCacheRequest, + O: EvictCacheResponse, + kind: MethodKind.Unary, + }, + } +} as const; + diff --git a/flyteidl/gen/pb-es/flyteidl/service/cache_pb.ts b/flyteidl/gen/pb-es/flyteidl/service/cache_pb.ts new file mode 100644 index 0000000000..92d305b8d5 --- /dev/null +++ b/flyteidl/gen/pb-es/flyteidl/service/cache_pb.ts @@ -0,0 +1,88 @@ +// @generated by protoc-gen-es v1.7.2 with parameter "target=ts" +// @generated from file flyteidl/service/cache.proto (package flyteidl.service, syntax proto3) +/* eslint-disable */ +// @ts-nocheck + +import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, PartialMessage, PlainMessage } from "@bufbuild/protobuf"; +import { Message, proto3 } from "@bufbuild/protobuf"; +import { TaskExecutionIdentifier } from "../core/identifier_pb.js"; +import { CacheEvictionErrorList } from "../core/errors_pb.js"; + +/** + * @generated from message flyteidl.service.EvictTaskExecutionCacheRequest + */ +export class EvictTaskExecutionCacheRequest extends Message { + /** + * Identifier of :ref:`ref_flyteidl.admin.TaskExecution` to evict cache for. + * + * @generated from field: flyteidl.core.TaskExecutionIdentifier task_execution_id = 1; + */ + taskExecutionId?: TaskExecutionIdentifier; + + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } + + static readonly runtime: typeof proto3 = proto3; + static readonly typeName = "flyteidl.service.EvictTaskExecutionCacheRequest"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + { no: 1, name: "task_execution_id", kind: "message", T: TaskExecutionIdentifier }, + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): EvictTaskExecutionCacheRequest { + return new EvictTaskExecutionCacheRequest().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): EvictTaskExecutionCacheRequest { + return new EvictTaskExecutionCacheRequest().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): EvictTaskExecutionCacheRequest { + return new EvictTaskExecutionCacheRequest().fromJsonString(jsonString, options); + } + + static equals(a: EvictTaskExecutionCacheRequest | PlainMessage | undefined, b: EvictTaskExecutionCacheRequest | PlainMessage | undefined): boolean { + return proto3.util.equals(EvictTaskExecutionCacheRequest, a, b); + } +} + +/** + * @generated from message flyteidl.service.EvictCacheResponse + */ +export class EvictCacheResponse extends Message { + /** + * List of errors encountered during cache eviction (if any). + * + * @generated from field: flyteidl.core.CacheEvictionErrorList errors = 1; + */ + errors?: CacheEvictionErrorList; + + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } + + static readonly runtime: typeof proto3 = proto3; + static readonly typeName = "flyteidl.service.EvictCacheResponse"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + { no: 1, name: "errors", kind: "message", T: CacheEvictionErrorList }, + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): EvictCacheResponse { + return new EvictCacheResponse().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): EvictCacheResponse { + return new EvictCacheResponse().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): EvictCacheResponse { + return new EvictCacheResponse().fromJsonString(jsonString, options); + } + + static equals(a: EvictCacheResponse | PlainMessage | undefined, b: EvictCacheResponse | PlainMessage | undefined): boolean { + return proto3.util.equals(EvictCacheResponse, a, b); + } +} + diff --git a/flyteidl/gen/pb-go/flyteidl/core/errors.pb.go b/flyteidl/gen/pb-go/flyteidl/core/errors.pb.go index 61e833ed1d..5513d9bc44 100644 --- a/flyteidl/gen/pb-go/flyteidl/core/errors.pb.go +++ b/flyteidl/gen/pb-go/flyteidl/core/errors.pb.go @@ -67,6 +67,67 @@ func (ContainerError_Kind) EnumDescriptor() ([]byte, []int) { return file_flyteidl_core_errors_proto_rawDescGZIP(), []int{0, 0} } +// Defines codes for distinguishing between errors encountered during cache eviction. +type CacheEvictionError_Code int32 + +const ( + // Indicates a generic internal error occurred. + CacheEvictionError_INTERNAL CacheEvictionError_Code = 0 + // Indicates no reservation could be acquired before deleting an artifact. + CacheEvictionError_RESERVATION_NOT_ACQUIRED CacheEvictionError_Code = 1 + // Indicates updating the database entry related to the node execution failed. + CacheEvictionError_DATABASE_UPDATE_FAILED CacheEvictionError_Code = 2 + // Indicates deleting the artifact from datacatalog failed. + CacheEvictionError_ARTIFACT_DELETE_FAILED CacheEvictionError_Code = 3 + // Indicates the reservation previously acquired could not be released for an artifact. + CacheEvictionError_RESERVATION_NOT_RELEASED CacheEvictionError_Code = 4 +) + +// Enum value maps for CacheEvictionError_Code. +var ( + CacheEvictionError_Code_name = map[int32]string{ + 0: "INTERNAL", + 1: "RESERVATION_NOT_ACQUIRED", + 2: "DATABASE_UPDATE_FAILED", + 3: "ARTIFACT_DELETE_FAILED", + 4: "RESERVATION_NOT_RELEASED", + } + CacheEvictionError_Code_value = map[string]int32{ + "INTERNAL": 0, + "RESERVATION_NOT_ACQUIRED": 1, + "DATABASE_UPDATE_FAILED": 2, + "ARTIFACT_DELETE_FAILED": 3, + "RESERVATION_NOT_RELEASED": 4, + } +) + +func (x CacheEvictionError_Code) Enum() *CacheEvictionError_Code { + p := new(CacheEvictionError_Code) + *p = x + return p +} + +func (x CacheEvictionError_Code) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (CacheEvictionError_Code) Descriptor() protoreflect.EnumDescriptor { + return file_flyteidl_core_errors_proto_enumTypes[1].Descriptor() +} + +func (CacheEvictionError_Code) Type() protoreflect.EnumType { + return &file_flyteidl_core_errors_proto_enumTypes[1] +} + +func (x CacheEvictionError_Code) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use CacheEvictionError_Code.Descriptor instead. +func (CacheEvictionError_Code) EnumDescriptor() ([]byte, []int) { + return file_flyteidl_core_errors_proto_rawDescGZIP(), []int{2, 0} +} + // Error message to propagate detailed errors from container executions to the execution // engine. type ContainerError struct { @@ -194,6 +255,167 @@ func (x *ErrorDocument) GetError() *ContainerError { return nil } +// Error returned if eviction of cached output fails and should be re-tried by the user. +type CacheEvictionError struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Error code to match type of cache eviction error encountered. + Code CacheEvictionError_Code `protobuf:"varint,1,opt,name=code,proto3,enum=flyteidl.core.CacheEvictionError_Code" json:"code,omitempty"` + // More detailed error message explaining the reason for the cache eviction failure. + Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"` + // ID of the node execution the cache eviction failed for. + NodeExecutionId *NodeExecutionIdentifier `protobuf:"bytes,3,opt,name=node_execution_id,json=nodeExecutionId,proto3" json:"node_execution_id,omitempty"` + // Source of the node execution. + // + // Types that are assignable to Source: + // + // *CacheEvictionError_TaskExecutionId + // *CacheEvictionError_WorkflowExecutionId + Source isCacheEvictionError_Source `protobuf_oneof:"source"` +} + +func (x *CacheEvictionError) Reset() { + *x = CacheEvictionError{} + if protoimpl.UnsafeEnabled { + mi := &file_flyteidl_core_errors_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CacheEvictionError) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CacheEvictionError) ProtoMessage() {} + +func (x *CacheEvictionError) ProtoReflect() protoreflect.Message { + mi := &file_flyteidl_core_errors_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CacheEvictionError.ProtoReflect.Descriptor instead. +func (*CacheEvictionError) Descriptor() ([]byte, []int) { + return file_flyteidl_core_errors_proto_rawDescGZIP(), []int{2} +} + +func (x *CacheEvictionError) GetCode() CacheEvictionError_Code { + if x != nil { + return x.Code + } + return CacheEvictionError_INTERNAL +} + +func (x *CacheEvictionError) GetMessage() string { + if x != nil { + return x.Message + } + return "" +} + +func (x *CacheEvictionError) GetNodeExecutionId() *NodeExecutionIdentifier { + if x != nil { + return x.NodeExecutionId + } + return nil +} + +func (m *CacheEvictionError) GetSource() isCacheEvictionError_Source { + if m != nil { + return m.Source + } + return nil +} + +func (x *CacheEvictionError) GetTaskExecutionId() *TaskExecutionIdentifier { + if x, ok := x.GetSource().(*CacheEvictionError_TaskExecutionId); ok { + return x.TaskExecutionId + } + return nil +} + +func (x *CacheEvictionError) GetWorkflowExecutionId() *WorkflowExecutionIdentifier { + if x, ok := x.GetSource().(*CacheEvictionError_WorkflowExecutionId); ok { + return x.WorkflowExecutionId + } + return nil +} + +type isCacheEvictionError_Source interface { + isCacheEvictionError_Source() +} + +type CacheEvictionError_TaskExecutionId struct { + // ID of the task execution the cache eviction failed for (if the node execution was part of a task execution). + TaskExecutionId *TaskExecutionIdentifier `protobuf:"bytes,4,opt,name=task_execution_id,json=taskExecutionId,proto3,oneof"` +} + +type CacheEvictionError_WorkflowExecutionId struct { + // ID of the workflow execution the cache eviction failed for (if the node execution was part of a workflow execution). + WorkflowExecutionId *WorkflowExecutionIdentifier `protobuf:"bytes,5,opt,name=workflow_execution_id,json=workflowExecutionId,proto3,oneof"` +} + +func (*CacheEvictionError_TaskExecutionId) isCacheEvictionError_Source() {} + +func (*CacheEvictionError_WorkflowExecutionId) isCacheEvictionError_Source() {} + +// List of :ref:`ref_flyteidl.core.CacheEvictionError` encountered during a cache eviction request. +type CacheEvictionErrorList struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Errors []*CacheEvictionError `protobuf:"bytes,1,rep,name=errors,proto3" json:"errors,omitempty"` +} + +func (x *CacheEvictionErrorList) Reset() { + *x = CacheEvictionErrorList{} + if protoimpl.UnsafeEnabled { + mi := &file_flyteidl_core_errors_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CacheEvictionErrorList) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CacheEvictionErrorList) ProtoMessage() {} + +func (x *CacheEvictionErrorList) ProtoReflect() protoreflect.Message { + mi := &file_flyteidl_core_errors_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CacheEvictionErrorList.ProtoReflect.Descriptor instead. +func (*CacheEvictionErrorList) Descriptor() ([]byte, []int) { + return file_flyteidl_core_errors_proto_rawDescGZIP(), []int{3} +} + +func (x *CacheEvictionErrorList) GetErrors() []*CacheEvictionError { + if x != nil { + return x.Errors + } + return nil +} + var File_flyteidl_core_errors_proto protoreflect.FileDescriptor var file_flyteidl_core_errors_proto_rawDesc = []byte{ @@ -201,7 +423,9 @@ var file_flyteidl_core_errors_proto_rawDesc = []byte{ 0x65, 0x72, 0x72, 0x6f, 0x72, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0d, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x1a, 0x1d, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x65, 0x78, 0x65, 0x63, 0x75, - 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xe5, 0x01, 0x0a, 0x0e, 0x43, + 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x66, 0x6c, 0x79, 0x74, + 0x65, 0x69, 0x64, 0x6c, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, + 0x66, 0x69, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xe5, 0x01, 0x0a, 0x0e, 0x43, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x02, 0x20, 0x01, @@ -220,19 +444,57 @@ var file_flyteidl_core_errors_proto_rawDesc = []byte{ 0x65, 0x6e, 0x74, 0x12, 0x33, 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x45, 0x72, 0x72, 0x6f, - 0x72, 0x52, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x42, 0xb1, 0x01, 0x0a, 0x11, 0x63, 0x6f, 0x6d, - 0x2e, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x42, 0x0b, - 0x45, 0x72, 0x72, 0x6f, 0x72, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x3a, 0x67, - 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x6f, - 0x72, 0x67, 0x2f, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x2f, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, - 0x6c, 0x2f, 0x67, 0x65, 0x6e, 0x2f, 0x70, 0x62, 0x2d, 0x67, 0x6f, 0x2f, 0x66, 0x6c, 0x79, 0x74, - 0x65, 0x69, 0x64, 0x6c, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0xa2, 0x02, 0x03, 0x46, 0x43, 0x58, 0xaa, - 0x02, 0x0d, 0x46, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2e, 0x43, 0x6f, 0x72, 0x65, 0xca, - 0x02, 0x0d, 0x46, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x5c, 0x43, 0x6f, 0x72, 0x65, 0xe2, - 0x02, 0x19, 0x46, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x5c, 0x43, 0x6f, 0x72, 0x65, 0x5c, - 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0e, 0x46, 0x6c, - 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x3a, 0x3a, 0x43, 0x6f, 0x72, 0x65, 0x62, 0x06, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x33, + 0x72, 0x52, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x22, 0x8b, 0x04, 0x0a, 0x12, 0x43, 0x61, 0x63, + 0x68, 0x65, 0x45, 0x76, 0x69, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x12, + 0x3a, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x26, 0x2e, + 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x43, 0x61, + 0x63, 0x68, 0x65, 0x45, 0x76, 0x69, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x72, 0x72, 0x6f, 0x72, + 0x2e, 0x43, 0x6f, 0x64, 0x65, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x6d, + 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65, + 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x52, 0x0a, 0x11, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x65, 0x78, + 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x26, 0x2e, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2e, 0x63, 0x6f, 0x72, 0x65, + 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, + 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x52, 0x0f, 0x6e, 0x6f, 0x64, 0x65, 0x45, 0x78, + 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x54, 0x0a, 0x11, 0x74, 0x61, 0x73, + 0x6b, 0x5f, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x04, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2e, + 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, + 0x6f, 0x6e, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x48, 0x00, 0x52, 0x0f, + 0x74, 0x61, 0x73, 0x6b, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, + 0x60, 0x0a, 0x15, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x5f, 0x65, 0x78, 0x65, 0x63, + 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, + 0x2e, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x57, + 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, + 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x48, 0x00, 0x52, 0x13, 0x77, 0x6f, + 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x49, + 0x64, 0x22, 0x88, 0x01, 0x0a, 0x04, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x0c, 0x0a, 0x08, 0x49, 0x4e, + 0x54, 0x45, 0x52, 0x4e, 0x41, 0x4c, 0x10, 0x00, 0x12, 0x1c, 0x0a, 0x18, 0x52, 0x45, 0x53, 0x45, + 0x52, 0x56, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x4e, 0x4f, 0x54, 0x5f, 0x41, 0x43, 0x51, 0x55, + 0x49, 0x52, 0x45, 0x44, 0x10, 0x01, 0x12, 0x1a, 0x0a, 0x16, 0x44, 0x41, 0x54, 0x41, 0x42, 0x41, + 0x53, 0x45, 0x5f, 0x55, 0x50, 0x44, 0x41, 0x54, 0x45, 0x5f, 0x46, 0x41, 0x49, 0x4c, 0x45, 0x44, + 0x10, 0x02, 0x12, 0x1a, 0x0a, 0x16, 0x41, 0x52, 0x54, 0x49, 0x46, 0x41, 0x43, 0x54, 0x5f, 0x44, + 0x45, 0x4c, 0x45, 0x54, 0x45, 0x5f, 0x46, 0x41, 0x49, 0x4c, 0x45, 0x44, 0x10, 0x03, 0x12, 0x1c, + 0x0a, 0x18, 0x52, 0x45, 0x53, 0x45, 0x52, 0x56, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x4e, 0x4f, + 0x54, 0x5f, 0x52, 0x45, 0x4c, 0x45, 0x41, 0x53, 0x45, 0x44, 0x10, 0x04, 0x42, 0x08, 0x0a, 0x06, + 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x22, 0x53, 0x0a, 0x16, 0x43, 0x61, 0x63, 0x68, 0x65, 0x45, + 0x76, 0x69, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x4c, 0x69, 0x73, 0x74, + 0x12, 0x39, 0x0a, 0x06, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x21, 0x2e, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2e, 0x63, 0x6f, 0x72, 0x65, + 0x2e, 0x43, 0x61, 0x63, 0x68, 0x65, 0x45, 0x76, 0x69, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x72, + 0x72, 0x6f, 0x72, 0x52, 0x06, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x73, 0x42, 0xb1, 0x01, 0x0a, 0x11, + 0x63, 0x6f, 0x6d, 0x2e, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2e, 0x63, 0x6f, 0x72, + 0x65, 0x42, 0x0b, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, + 0x5a, 0x3a, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x66, 0x6c, 0x79, + 0x74, 0x65, 0x6f, 0x72, 0x67, 0x2f, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x2f, 0x66, 0x6c, 0x79, 0x74, + 0x65, 0x69, 0x64, 0x6c, 0x2f, 0x67, 0x65, 0x6e, 0x2f, 0x70, 0x62, 0x2d, 0x67, 0x6f, 0x2f, 0x66, + 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0xa2, 0x02, 0x03, 0x46, + 0x43, 0x58, 0xaa, 0x02, 0x0d, 0x46, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2e, 0x43, 0x6f, + 0x72, 0x65, 0xca, 0x02, 0x0d, 0x46, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x5c, 0x43, 0x6f, + 0x72, 0x65, 0xe2, 0x02, 0x19, 0x46, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x5c, 0x43, 0x6f, + 0x72, 0x65, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, + 0x0e, 0x46, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x3a, 0x3a, 0x43, 0x6f, 0x72, 0x65, 0x62, + 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -247,23 +509,34 @@ func file_flyteidl_core_errors_proto_rawDescGZIP() []byte { return file_flyteidl_core_errors_proto_rawDescData } -var file_flyteidl_core_errors_proto_enumTypes = make([]protoimpl.EnumInfo, 1) -var file_flyteidl_core_errors_proto_msgTypes = make([]protoimpl.MessageInfo, 2) +var file_flyteidl_core_errors_proto_enumTypes = make([]protoimpl.EnumInfo, 2) +var file_flyteidl_core_errors_proto_msgTypes = make([]protoimpl.MessageInfo, 4) var file_flyteidl_core_errors_proto_goTypes = []interface{}{ - (ContainerError_Kind)(0), // 0: flyteidl.core.ContainerError.Kind - (*ContainerError)(nil), // 1: flyteidl.core.ContainerError - (*ErrorDocument)(nil), // 2: flyteidl.core.ErrorDocument - (ExecutionError_ErrorKind)(0), // 3: flyteidl.core.ExecutionError.ErrorKind + (ContainerError_Kind)(0), // 0: flyteidl.core.ContainerError.Kind + (CacheEvictionError_Code)(0), // 1: flyteidl.core.CacheEvictionError.Code + (*ContainerError)(nil), // 2: flyteidl.core.ContainerError + (*ErrorDocument)(nil), // 3: flyteidl.core.ErrorDocument + (*CacheEvictionError)(nil), // 4: flyteidl.core.CacheEvictionError + (*CacheEvictionErrorList)(nil), // 5: flyteidl.core.CacheEvictionErrorList + (ExecutionError_ErrorKind)(0), // 6: flyteidl.core.ExecutionError.ErrorKind + (*NodeExecutionIdentifier)(nil), // 7: flyteidl.core.NodeExecutionIdentifier + (*TaskExecutionIdentifier)(nil), // 8: flyteidl.core.TaskExecutionIdentifier + (*WorkflowExecutionIdentifier)(nil), // 9: flyteidl.core.WorkflowExecutionIdentifier } var file_flyteidl_core_errors_proto_depIdxs = []int32{ 0, // 0: flyteidl.core.ContainerError.kind:type_name -> flyteidl.core.ContainerError.Kind - 3, // 1: flyteidl.core.ContainerError.origin:type_name -> flyteidl.core.ExecutionError.ErrorKind - 1, // 2: flyteidl.core.ErrorDocument.error:type_name -> flyteidl.core.ContainerError - 3, // [3:3] is the sub-list for method output_type - 3, // [3:3] is the sub-list for method input_type - 3, // [3:3] is the sub-list for extension type_name - 3, // [3:3] is the sub-list for extension extendee - 0, // [0:3] is the sub-list for field type_name + 6, // 1: flyteidl.core.ContainerError.origin:type_name -> flyteidl.core.ExecutionError.ErrorKind + 2, // 2: flyteidl.core.ErrorDocument.error:type_name -> flyteidl.core.ContainerError + 1, // 3: flyteidl.core.CacheEvictionError.code:type_name -> flyteidl.core.CacheEvictionError.Code + 7, // 4: flyteidl.core.CacheEvictionError.node_execution_id:type_name -> flyteidl.core.NodeExecutionIdentifier + 8, // 5: flyteidl.core.CacheEvictionError.task_execution_id:type_name -> flyteidl.core.TaskExecutionIdentifier + 9, // 6: flyteidl.core.CacheEvictionError.workflow_execution_id:type_name -> flyteidl.core.WorkflowExecutionIdentifier + 4, // 7: flyteidl.core.CacheEvictionErrorList.errors:type_name -> flyteidl.core.CacheEvictionError + 8, // [8:8] is the sub-list for method output_type + 8, // [8:8] is the sub-list for method input_type + 8, // [8:8] is the sub-list for extension type_name + 8, // [8:8] is the sub-list for extension extendee + 0, // [0:8] is the sub-list for field type_name } func init() { file_flyteidl_core_errors_proto_init() } @@ -272,6 +545,7 @@ func file_flyteidl_core_errors_proto_init() { return } file_flyteidl_core_execution_proto_init() + file_flyteidl_core_identifier_proto_init() if !protoimpl.UnsafeEnabled { file_flyteidl_core_errors_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ContainerError); i { @@ -297,14 +571,42 @@ func file_flyteidl_core_errors_proto_init() { return nil } } + file_flyteidl_core_errors_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CacheEvictionError); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_flyteidl_core_errors_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CacheEvictionErrorList); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + file_flyteidl_core_errors_proto_msgTypes[2].OneofWrappers = []interface{}{ + (*CacheEvictionError_TaskExecutionId)(nil), + (*CacheEvictionError_WorkflowExecutionId)(nil), } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_flyteidl_core_errors_proto_rawDesc, - NumEnums: 1, - NumMessages: 2, + NumEnums: 2, + NumMessages: 4, NumExtensions: 0, NumServices: 0, }, diff --git a/flyteidl/gen/pb-go/flyteidl/datacatalog/datacatalog.pb.go b/flyteidl/gen/pb-go/flyteidl/datacatalog/datacatalog.pb.go index 46e7727f35..087fda016c 100644 --- a/flyteidl/gen/pb-go/flyteidl/datacatalog/datacatalog.pb.go +++ b/flyteidl/gen/pb-go/flyteidl/datacatalog/datacatalog.pb.go @@ -64,7 +64,7 @@ func (x SinglePropertyFilter_ComparisonOperator) Number() protoreflect.EnumNumbe // Deprecated: Use SinglePropertyFilter_ComparisonOperator.Descriptor instead. func (SinglePropertyFilter_ComparisonOperator) EnumDescriptor() ([]byte, []int) { - return file_flyteidl_datacatalog_datacatalog_proto_rawDescGZIP(), []int{30, 0} + return file_flyteidl_datacatalog_datacatalog_proto_rawDescGZIP(), []int{32, 0} } type PaginationOptions_SortOrder int32 @@ -110,7 +110,7 @@ func (x PaginationOptions_SortOrder) Number() protoreflect.EnumNumber { // Deprecated: Use PaginationOptions_SortOrder.Descriptor instead. func (PaginationOptions_SortOrder) EnumDescriptor() ([]byte, []int) { - return file_flyteidl_datacatalog_datacatalog_proto_rawDescGZIP(), []int{36, 0} + return file_flyteidl_datacatalog_datacatalog_proto_rawDescGZIP(), []int{38, 0} } type PaginationOptions_SortKey int32 @@ -153,7 +153,7 @@ func (x PaginationOptions_SortKey) Number() protoreflect.EnumNumber { // Deprecated: Use PaginationOptions_SortKey.Descriptor instead. func (PaginationOptions_SortKey) EnumDescriptor() ([]byte, []int) { - return file_flyteidl_datacatalog_datacatalog_proto_rawDescGZIP(), []int{36, 1} + return file_flyteidl_datacatalog_datacatalog_proto_rawDescGZIP(), []int{38, 1} } // Request message for creating a Dataset. @@ -1058,6 +1058,138 @@ func (x *UpdateArtifactResponse) GetArtifactId() string { return "" } +// Request message for deleting an Artifact and its associated ArtifactData. +type DeleteArtifactRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // ID of dataset the artifact is associated with + Dataset *DatasetID `protobuf:"bytes,1,opt,name=dataset,proto3" json:"dataset,omitempty"` + // Either ID of artifact or name of tag of existing artifact + // + // Types that are assignable to QueryHandle: + // + // *DeleteArtifactRequest_ArtifactId + // *DeleteArtifactRequest_TagName + QueryHandle isDeleteArtifactRequest_QueryHandle `protobuf_oneof:"query_handle"` +} + +func (x *DeleteArtifactRequest) Reset() { + *x = DeleteArtifactRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_flyteidl_datacatalog_datacatalog_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DeleteArtifactRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeleteArtifactRequest) ProtoMessage() {} + +func (x *DeleteArtifactRequest) ProtoReflect() protoreflect.Message { + mi := &file_flyteidl_datacatalog_datacatalog_proto_msgTypes[16] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DeleteArtifactRequest.ProtoReflect.Descriptor instead. +func (*DeleteArtifactRequest) Descriptor() ([]byte, []int) { + return file_flyteidl_datacatalog_datacatalog_proto_rawDescGZIP(), []int{16} +} + +func (x *DeleteArtifactRequest) GetDataset() *DatasetID { + if x != nil { + return x.Dataset + } + return nil +} + +func (m *DeleteArtifactRequest) GetQueryHandle() isDeleteArtifactRequest_QueryHandle { + if m != nil { + return m.QueryHandle + } + return nil +} + +func (x *DeleteArtifactRequest) GetArtifactId() string { + if x, ok := x.GetQueryHandle().(*DeleteArtifactRequest_ArtifactId); ok { + return x.ArtifactId + } + return "" +} + +func (x *DeleteArtifactRequest) GetTagName() string { + if x, ok := x.GetQueryHandle().(*DeleteArtifactRequest_TagName); ok { + return x.TagName + } + return "" +} + +type isDeleteArtifactRequest_QueryHandle interface { + isDeleteArtifactRequest_QueryHandle() +} + +type DeleteArtifactRequest_ArtifactId struct { + ArtifactId string `protobuf:"bytes,2,opt,name=artifact_id,json=artifactId,proto3,oneof"` +} + +type DeleteArtifactRequest_TagName struct { + TagName string `protobuf:"bytes,3,opt,name=tag_name,json=tagName,proto3,oneof"` +} + +func (*DeleteArtifactRequest_ArtifactId) isDeleteArtifactRequest_QueryHandle() {} + +func (*DeleteArtifactRequest_TagName) isDeleteArtifactRequest_QueryHandle() {} + +// Response message for deleting an Artifact. +type DeleteArtifactResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *DeleteArtifactResponse) Reset() { + *x = DeleteArtifactResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_flyteidl_datacatalog_datacatalog_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DeleteArtifactResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeleteArtifactResponse) ProtoMessage() {} + +func (x *DeleteArtifactResponse) ProtoReflect() protoreflect.Message { + mi := &file_flyteidl_datacatalog_datacatalog_proto_msgTypes[17] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DeleteArtifactResponse.ProtoReflect.Descriptor instead. +func (*DeleteArtifactResponse) Descriptor() ([]byte, []int) { + return file_flyteidl_datacatalog_datacatalog_proto_rawDescGZIP(), []int{17} +} + // ReservationID message that is composed of several string fields. type ReservationID struct { state protoimpl.MessageState @@ -1073,7 +1205,7 @@ type ReservationID struct { func (x *ReservationID) Reset() { *x = ReservationID{} if protoimpl.UnsafeEnabled { - mi := &file_flyteidl_datacatalog_datacatalog_proto_msgTypes[16] + mi := &file_flyteidl_datacatalog_datacatalog_proto_msgTypes[18] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1086,7 +1218,7 @@ func (x *ReservationID) String() string { func (*ReservationID) ProtoMessage() {} func (x *ReservationID) ProtoReflect() protoreflect.Message { - mi := &file_flyteidl_datacatalog_datacatalog_proto_msgTypes[16] + mi := &file_flyteidl_datacatalog_datacatalog_proto_msgTypes[18] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1099,7 +1231,7 @@ func (x *ReservationID) ProtoReflect() protoreflect.Message { // Deprecated: Use ReservationID.ProtoReflect.Descriptor instead. func (*ReservationID) Descriptor() ([]byte, []int) { - return file_flyteidl_datacatalog_datacatalog_proto_rawDescGZIP(), []int{16} + return file_flyteidl_datacatalog_datacatalog_proto_rawDescGZIP(), []int{18} } func (x *ReservationID) GetDatasetId() *DatasetID { @@ -1133,7 +1265,7 @@ type GetOrExtendReservationRequest struct { func (x *GetOrExtendReservationRequest) Reset() { *x = GetOrExtendReservationRequest{} if protoimpl.UnsafeEnabled { - mi := &file_flyteidl_datacatalog_datacatalog_proto_msgTypes[17] + mi := &file_flyteidl_datacatalog_datacatalog_proto_msgTypes[19] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1146,7 +1278,7 @@ func (x *GetOrExtendReservationRequest) String() string { func (*GetOrExtendReservationRequest) ProtoMessage() {} func (x *GetOrExtendReservationRequest) ProtoReflect() protoreflect.Message { - mi := &file_flyteidl_datacatalog_datacatalog_proto_msgTypes[17] + mi := &file_flyteidl_datacatalog_datacatalog_proto_msgTypes[19] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1159,7 +1291,7 @@ func (x *GetOrExtendReservationRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use GetOrExtendReservationRequest.ProtoReflect.Descriptor instead. func (*GetOrExtendReservationRequest) Descriptor() ([]byte, []int) { - return file_flyteidl_datacatalog_datacatalog_proto_rawDescGZIP(), []int{17} + return file_flyteidl_datacatalog_datacatalog_proto_rawDescGZIP(), []int{19} } func (x *GetOrExtendReservationRequest) GetReservationId() *ReservationID { @@ -1204,7 +1336,7 @@ type Reservation struct { func (x *Reservation) Reset() { *x = Reservation{} if protoimpl.UnsafeEnabled { - mi := &file_flyteidl_datacatalog_datacatalog_proto_msgTypes[18] + mi := &file_flyteidl_datacatalog_datacatalog_proto_msgTypes[20] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1217,7 +1349,7 @@ func (x *Reservation) String() string { func (*Reservation) ProtoMessage() {} func (x *Reservation) ProtoReflect() protoreflect.Message { - mi := &file_flyteidl_datacatalog_datacatalog_proto_msgTypes[18] + mi := &file_flyteidl_datacatalog_datacatalog_proto_msgTypes[20] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1230,7 +1362,7 @@ func (x *Reservation) ProtoReflect() protoreflect.Message { // Deprecated: Use Reservation.ProtoReflect.Descriptor instead. func (*Reservation) Descriptor() ([]byte, []int) { - return file_flyteidl_datacatalog_datacatalog_proto_rawDescGZIP(), []int{18} + return file_flyteidl_datacatalog_datacatalog_proto_rawDescGZIP(), []int{20} } func (x *Reservation) GetReservationId() *ReservationID { @@ -1281,7 +1413,7 @@ type GetOrExtendReservationResponse struct { func (x *GetOrExtendReservationResponse) Reset() { *x = GetOrExtendReservationResponse{} if protoimpl.UnsafeEnabled { - mi := &file_flyteidl_datacatalog_datacatalog_proto_msgTypes[19] + mi := &file_flyteidl_datacatalog_datacatalog_proto_msgTypes[21] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1294,7 +1426,7 @@ func (x *GetOrExtendReservationResponse) String() string { func (*GetOrExtendReservationResponse) ProtoMessage() {} func (x *GetOrExtendReservationResponse) ProtoReflect() protoreflect.Message { - mi := &file_flyteidl_datacatalog_datacatalog_proto_msgTypes[19] + mi := &file_flyteidl_datacatalog_datacatalog_proto_msgTypes[21] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1307,7 +1439,7 @@ func (x *GetOrExtendReservationResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use GetOrExtendReservationResponse.ProtoReflect.Descriptor instead. func (*GetOrExtendReservationResponse) Descriptor() ([]byte, []int) { - return file_flyteidl_datacatalog_datacatalog_proto_rawDescGZIP(), []int{19} + return file_flyteidl_datacatalog_datacatalog_proto_rawDescGZIP(), []int{21} } func (x *GetOrExtendReservationResponse) GetReservation() *Reservation { @@ -1332,7 +1464,7 @@ type ReleaseReservationRequest struct { func (x *ReleaseReservationRequest) Reset() { *x = ReleaseReservationRequest{} if protoimpl.UnsafeEnabled { - mi := &file_flyteidl_datacatalog_datacatalog_proto_msgTypes[20] + mi := &file_flyteidl_datacatalog_datacatalog_proto_msgTypes[22] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1345,7 +1477,7 @@ func (x *ReleaseReservationRequest) String() string { func (*ReleaseReservationRequest) ProtoMessage() {} func (x *ReleaseReservationRequest) ProtoReflect() protoreflect.Message { - mi := &file_flyteidl_datacatalog_datacatalog_proto_msgTypes[20] + mi := &file_flyteidl_datacatalog_datacatalog_proto_msgTypes[22] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1358,7 +1490,7 @@ func (x *ReleaseReservationRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use ReleaseReservationRequest.ProtoReflect.Descriptor instead. func (*ReleaseReservationRequest) Descriptor() ([]byte, []int) { - return file_flyteidl_datacatalog_datacatalog_proto_rawDescGZIP(), []int{20} + return file_flyteidl_datacatalog_datacatalog_proto_rawDescGZIP(), []int{22} } func (x *ReleaseReservationRequest) GetReservationId() *ReservationID { @@ -1385,7 +1517,7 @@ type ReleaseReservationResponse struct { func (x *ReleaseReservationResponse) Reset() { *x = ReleaseReservationResponse{} if protoimpl.UnsafeEnabled { - mi := &file_flyteidl_datacatalog_datacatalog_proto_msgTypes[21] + mi := &file_flyteidl_datacatalog_datacatalog_proto_msgTypes[23] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1398,7 +1530,7 @@ func (x *ReleaseReservationResponse) String() string { func (*ReleaseReservationResponse) ProtoMessage() {} func (x *ReleaseReservationResponse) ProtoReflect() protoreflect.Message { - mi := &file_flyteidl_datacatalog_datacatalog_proto_msgTypes[21] + mi := &file_flyteidl_datacatalog_datacatalog_proto_msgTypes[23] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1411,7 +1543,7 @@ func (x *ReleaseReservationResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use ReleaseReservationResponse.ProtoReflect.Descriptor instead. func (*ReleaseReservationResponse) Descriptor() ([]byte, []int) { - return file_flyteidl_datacatalog_datacatalog_proto_rawDescGZIP(), []int{21} + return file_flyteidl_datacatalog_datacatalog_proto_rawDescGZIP(), []int{23} } // Dataset message. It is uniquely identified by DatasetID. @@ -1428,7 +1560,7 @@ type Dataset struct { func (x *Dataset) Reset() { *x = Dataset{} if protoimpl.UnsafeEnabled { - mi := &file_flyteidl_datacatalog_datacatalog_proto_msgTypes[22] + mi := &file_flyteidl_datacatalog_datacatalog_proto_msgTypes[24] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1441,7 +1573,7 @@ func (x *Dataset) String() string { func (*Dataset) ProtoMessage() {} func (x *Dataset) ProtoReflect() protoreflect.Message { - mi := &file_flyteidl_datacatalog_datacatalog_proto_msgTypes[22] + mi := &file_flyteidl_datacatalog_datacatalog_proto_msgTypes[24] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1454,7 +1586,7 @@ func (x *Dataset) ProtoReflect() protoreflect.Message { // Deprecated: Use Dataset.ProtoReflect.Descriptor instead. func (*Dataset) Descriptor() ([]byte, []int) { - return file_flyteidl_datacatalog_datacatalog_proto_rawDescGZIP(), []int{22} + return file_flyteidl_datacatalog_datacatalog_proto_rawDescGZIP(), []int{24} } func (x *Dataset) GetId() *DatasetID { @@ -1491,7 +1623,7 @@ type Partition struct { func (x *Partition) Reset() { *x = Partition{} if protoimpl.UnsafeEnabled { - mi := &file_flyteidl_datacatalog_datacatalog_proto_msgTypes[23] + mi := &file_flyteidl_datacatalog_datacatalog_proto_msgTypes[25] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1504,7 +1636,7 @@ func (x *Partition) String() string { func (*Partition) ProtoMessage() {} func (x *Partition) ProtoReflect() protoreflect.Message { - mi := &file_flyteidl_datacatalog_datacatalog_proto_msgTypes[23] + mi := &file_flyteidl_datacatalog_datacatalog_proto_msgTypes[25] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1517,7 +1649,7 @@ func (x *Partition) ProtoReflect() protoreflect.Message { // Deprecated: Use Partition.ProtoReflect.Descriptor instead. func (*Partition) Descriptor() ([]byte, []int) { - return file_flyteidl_datacatalog_datacatalog_proto_rawDescGZIP(), []int{23} + return file_flyteidl_datacatalog_datacatalog_proto_rawDescGZIP(), []int{25} } func (x *Partition) GetKey() string { @@ -1552,7 +1684,7 @@ type DatasetID struct { func (x *DatasetID) Reset() { *x = DatasetID{} if protoimpl.UnsafeEnabled { - mi := &file_flyteidl_datacatalog_datacatalog_proto_msgTypes[24] + mi := &file_flyteidl_datacatalog_datacatalog_proto_msgTypes[26] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1565,7 +1697,7 @@ func (x *DatasetID) String() string { func (*DatasetID) ProtoMessage() {} func (x *DatasetID) ProtoReflect() protoreflect.Message { - mi := &file_flyteidl_datacatalog_datacatalog_proto_msgTypes[24] + mi := &file_flyteidl_datacatalog_datacatalog_proto_msgTypes[26] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1578,7 +1710,7 @@ func (x *DatasetID) ProtoReflect() protoreflect.Message { // Deprecated: Use DatasetID.ProtoReflect.Descriptor instead. func (*DatasetID) Descriptor() ([]byte, []int) { - return file_flyteidl_datacatalog_datacatalog_proto_rawDescGZIP(), []int{24} + return file_flyteidl_datacatalog_datacatalog_proto_rawDescGZIP(), []int{26} } func (x *DatasetID) GetProject() string { @@ -1641,7 +1773,7 @@ type Artifact struct { func (x *Artifact) Reset() { *x = Artifact{} if protoimpl.UnsafeEnabled { - mi := &file_flyteidl_datacatalog_datacatalog_proto_msgTypes[25] + mi := &file_flyteidl_datacatalog_datacatalog_proto_msgTypes[27] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1654,7 +1786,7 @@ func (x *Artifact) String() string { func (*Artifact) ProtoMessage() {} func (x *Artifact) ProtoReflect() protoreflect.Message { - mi := &file_flyteidl_datacatalog_datacatalog_proto_msgTypes[25] + mi := &file_flyteidl_datacatalog_datacatalog_proto_msgTypes[27] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1667,7 +1799,7 @@ func (x *Artifact) ProtoReflect() protoreflect.Message { // Deprecated: Use Artifact.ProtoReflect.Descriptor instead. func (*Artifact) Descriptor() ([]byte, []int) { - return file_flyteidl_datacatalog_datacatalog_proto_rawDescGZIP(), []int{25} + return file_flyteidl_datacatalog_datacatalog_proto_rawDescGZIP(), []int{27} } func (x *Artifact) GetId() string { @@ -1732,7 +1864,7 @@ type ArtifactData struct { func (x *ArtifactData) Reset() { *x = ArtifactData{} if protoimpl.UnsafeEnabled { - mi := &file_flyteidl_datacatalog_datacatalog_proto_msgTypes[26] + mi := &file_flyteidl_datacatalog_datacatalog_proto_msgTypes[28] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1745,7 +1877,7 @@ func (x *ArtifactData) String() string { func (*ArtifactData) ProtoMessage() {} func (x *ArtifactData) ProtoReflect() protoreflect.Message { - mi := &file_flyteidl_datacatalog_datacatalog_proto_msgTypes[26] + mi := &file_flyteidl_datacatalog_datacatalog_proto_msgTypes[28] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1758,7 +1890,7 @@ func (x *ArtifactData) ProtoReflect() protoreflect.Message { // Deprecated: Use ArtifactData.ProtoReflect.Descriptor instead. func (*ArtifactData) Descriptor() ([]byte, []int) { - return file_flyteidl_datacatalog_datacatalog_proto_rawDescGZIP(), []int{26} + return file_flyteidl_datacatalog_datacatalog_proto_rawDescGZIP(), []int{28} } func (x *ArtifactData) GetName() string { @@ -1790,7 +1922,7 @@ type Tag struct { func (x *Tag) Reset() { *x = Tag{} if protoimpl.UnsafeEnabled { - mi := &file_flyteidl_datacatalog_datacatalog_proto_msgTypes[27] + mi := &file_flyteidl_datacatalog_datacatalog_proto_msgTypes[29] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1803,7 +1935,7 @@ func (x *Tag) String() string { func (*Tag) ProtoMessage() {} func (x *Tag) ProtoReflect() protoreflect.Message { - mi := &file_flyteidl_datacatalog_datacatalog_proto_msgTypes[27] + mi := &file_flyteidl_datacatalog_datacatalog_proto_msgTypes[29] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1816,7 +1948,7 @@ func (x *Tag) ProtoReflect() protoreflect.Message { // Deprecated: Use Tag.ProtoReflect.Descriptor instead. func (*Tag) Descriptor() ([]byte, []int) { - return file_flyteidl_datacatalog_datacatalog_proto_rawDescGZIP(), []int{27} + return file_flyteidl_datacatalog_datacatalog_proto_rawDescGZIP(), []int{29} } func (x *Tag) GetName() string { @@ -1852,7 +1984,7 @@ type Metadata struct { func (x *Metadata) Reset() { *x = Metadata{} if protoimpl.UnsafeEnabled { - mi := &file_flyteidl_datacatalog_datacatalog_proto_msgTypes[28] + mi := &file_flyteidl_datacatalog_datacatalog_proto_msgTypes[30] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1865,7 +1997,7 @@ func (x *Metadata) String() string { func (*Metadata) ProtoMessage() {} func (x *Metadata) ProtoReflect() protoreflect.Message { - mi := &file_flyteidl_datacatalog_datacatalog_proto_msgTypes[28] + mi := &file_flyteidl_datacatalog_datacatalog_proto_msgTypes[30] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1878,7 +2010,7 @@ func (x *Metadata) ProtoReflect() protoreflect.Message { // Deprecated: Use Metadata.ProtoReflect.Descriptor instead. func (*Metadata) Descriptor() ([]byte, []int) { - return file_flyteidl_datacatalog_datacatalog_proto_rawDescGZIP(), []int{28} + return file_flyteidl_datacatalog_datacatalog_proto_rawDescGZIP(), []int{30} } func (x *Metadata) GetKeyMap() map[string]string { @@ -1900,7 +2032,7 @@ type FilterExpression struct { func (x *FilterExpression) Reset() { *x = FilterExpression{} if protoimpl.UnsafeEnabled { - mi := &file_flyteidl_datacatalog_datacatalog_proto_msgTypes[29] + mi := &file_flyteidl_datacatalog_datacatalog_proto_msgTypes[31] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1913,7 +2045,7 @@ func (x *FilterExpression) String() string { func (*FilterExpression) ProtoMessage() {} func (x *FilterExpression) ProtoReflect() protoreflect.Message { - mi := &file_flyteidl_datacatalog_datacatalog_proto_msgTypes[29] + mi := &file_flyteidl_datacatalog_datacatalog_proto_msgTypes[31] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1926,7 +2058,7 @@ func (x *FilterExpression) ProtoReflect() protoreflect.Message { // Deprecated: Use FilterExpression.ProtoReflect.Descriptor instead. func (*FilterExpression) Descriptor() ([]byte, []int) { - return file_flyteidl_datacatalog_datacatalog_proto_rawDescGZIP(), []int{29} + return file_flyteidl_datacatalog_datacatalog_proto_rawDescGZIP(), []int{31} } func (x *FilterExpression) GetFilters() []*SinglePropertyFilter { @@ -1955,7 +2087,7 @@ type SinglePropertyFilter struct { func (x *SinglePropertyFilter) Reset() { *x = SinglePropertyFilter{} if protoimpl.UnsafeEnabled { - mi := &file_flyteidl_datacatalog_datacatalog_proto_msgTypes[30] + mi := &file_flyteidl_datacatalog_datacatalog_proto_msgTypes[32] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1968,7 +2100,7 @@ func (x *SinglePropertyFilter) String() string { func (*SinglePropertyFilter) ProtoMessage() {} func (x *SinglePropertyFilter) ProtoReflect() protoreflect.Message { - mi := &file_flyteidl_datacatalog_datacatalog_proto_msgTypes[30] + mi := &file_flyteidl_datacatalog_datacatalog_proto_msgTypes[32] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1981,7 +2113,7 @@ func (x *SinglePropertyFilter) ProtoReflect() protoreflect.Message { // Deprecated: Use SinglePropertyFilter.ProtoReflect.Descriptor instead. func (*SinglePropertyFilter) Descriptor() ([]byte, []int) { - return file_flyteidl_datacatalog_datacatalog_proto_rawDescGZIP(), []int{30} + return file_flyteidl_datacatalog_datacatalog_proto_rawDescGZIP(), []int{32} } func (m *SinglePropertyFilter) GetPropertyFilter() isSinglePropertyFilter_PropertyFilter { @@ -2071,7 +2203,7 @@ type ArtifactPropertyFilter struct { func (x *ArtifactPropertyFilter) Reset() { *x = ArtifactPropertyFilter{} if protoimpl.UnsafeEnabled { - mi := &file_flyteidl_datacatalog_datacatalog_proto_msgTypes[31] + mi := &file_flyteidl_datacatalog_datacatalog_proto_msgTypes[33] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2084,7 +2216,7 @@ func (x *ArtifactPropertyFilter) String() string { func (*ArtifactPropertyFilter) ProtoMessage() {} func (x *ArtifactPropertyFilter) ProtoReflect() protoreflect.Message { - mi := &file_flyteidl_datacatalog_datacatalog_proto_msgTypes[31] + mi := &file_flyteidl_datacatalog_datacatalog_proto_msgTypes[33] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2097,7 +2229,7 @@ func (x *ArtifactPropertyFilter) ProtoReflect() protoreflect.Message { // Deprecated: Use ArtifactPropertyFilter.ProtoReflect.Descriptor instead. func (*ArtifactPropertyFilter) Descriptor() ([]byte, []int) { - return file_flyteidl_datacatalog_datacatalog_proto_rawDescGZIP(), []int{31} + return file_flyteidl_datacatalog_datacatalog_proto_rawDescGZIP(), []int{33} } func (m *ArtifactPropertyFilter) GetProperty() isArtifactPropertyFilter_Property { @@ -2139,7 +2271,7 @@ type TagPropertyFilter struct { func (x *TagPropertyFilter) Reset() { *x = TagPropertyFilter{} if protoimpl.UnsafeEnabled { - mi := &file_flyteidl_datacatalog_datacatalog_proto_msgTypes[32] + mi := &file_flyteidl_datacatalog_datacatalog_proto_msgTypes[34] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2152,7 +2284,7 @@ func (x *TagPropertyFilter) String() string { func (*TagPropertyFilter) ProtoMessage() {} func (x *TagPropertyFilter) ProtoReflect() protoreflect.Message { - mi := &file_flyteidl_datacatalog_datacatalog_proto_msgTypes[32] + mi := &file_flyteidl_datacatalog_datacatalog_proto_msgTypes[34] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2165,7 +2297,7 @@ func (x *TagPropertyFilter) ProtoReflect() protoreflect.Message { // Deprecated: Use TagPropertyFilter.ProtoReflect.Descriptor instead. func (*TagPropertyFilter) Descriptor() ([]byte, []int) { - return file_flyteidl_datacatalog_datacatalog_proto_rawDescGZIP(), []int{32} + return file_flyteidl_datacatalog_datacatalog_proto_rawDescGZIP(), []int{34} } func (m *TagPropertyFilter) GetProperty() isTagPropertyFilter_Property { @@ -2207,7 +2339,7 @@ type PartitionPropertyFilter struct { func (x *PartitionPropertyFilter) Reset() { *x = PartitionPropertyFilter{} if protoimpl.UnsafeEnabled { - mi := &file_flyteidl_datacatalog_datacatalog_proto_msgTypes[33] + mi := &file_flyteidl_datacatalog_datacatalog_proto_msgTypes[35] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2220,7 +2352,7 @@ func (x *PartitionPropertyFilter) String() string { func (*PartitionPropertyFilter) ProtoMessage() {} func (x *PartitionPropertyFilter) ProtoReflect() protoreflect.Message { - mi := &file_flyteidl_datacatalog_datacatalog_proto_msgTypes[33] + mi := &file_flyteidl_datacatalog_datacatalog_proto_msgTypes[35] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2233,7 +2365,7 @@ func (x *PartitionPropertyFilter) ProtoReflect() protoreflect.Message { // Deprecated: Use PartitionPropertyFilter.ProtoReflect.Descriptor instead. func (*PartitionPropertyFilter) Descriptor() ([]byte, []int) { - return file_flyteidl_datacatalog_datacatalog_proto_rawDescGZIP(), []int{33} + return file_flyteidl_datacatalog_datacatalog_proto_rawDescGZIP(), []int{35} } func (m *PartitionPropertyFilter) GetProperty() isPartitionPropertyFilter_Property { @@ -2272,7 +2404,7 @@ type KeyValuePair struct { func (x *KeyValuePair) Reset() { *x = KeyValuePair{} if protoimpl.UnsafeEnabled { - mi := &file_flyteidl_datacatalog_datacatalog_proto_msgTypes[34] + mi := &file_flyteidl_datacatalog_datacatalog_proto_msgTypes[36] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2285,7 +2417,7 @@ func (x *KeyValuePair) String() string { func (*KeyValuePair) ProtoMessage() {} func (x *KeyValuePair) ProtoReflect() protoreflect.Message { - mi := &file_flyteidl_datacatalog_datacatalog_proto_msgTypes[34] + mi := &file_flyteidl_datacatalog_datacatalog_proto_msgTypes[36] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2298,7 +2430,7 @@ func (x *KeyValuePair) ProtoReflect() protoreflect.Message { // Deprecated: Use KeyValuePair.ProtoReflect.Descriptor instead. func (*KeyValuePair) Descriptor() ([]byte, []int) { - return file_flyteidl_datacatalog_datacatalog_proto_rawDescGZIP(), []int{34} + return file_flyteidl_datacatalog_datacatalog_proto_rawDescGZIP(), []int{36} } func (x *KeyValuePair) GetKey() string { @@ -2334,7 +2466,7 @@ type DatasetPropertyFilter struct { func (x *DatasetPropertyFilter) Reset() { *x = DatasetPropertyFilter{} if protoimpl.UnsafeEnabled { - mi := &file_flyteidl_datacatalog_datacatalog_proto_msgTypes[35] + mi := &file_flyteidl_datacatalog_datacatalog_proto_msgTypes[37] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2347,7 +2479,7 @@ func (x *DatasetPropertyFilter) String() string { func (*DatasetPropertyFilter) ProtoMessage() {} func (x *DatasetPropertyFilter) ProtoReflect() protoreflect.Message { - mi := &file_flyteidl_datacatalog_datacatalog_proto_msgTypes[35] + mi := &file_flyteidl_datacatalog_datacatalog_proto_msgTypes[37] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2360,7 +2492,7 @@ func (x *DatasetPropertyFilter) ProtoReflect() protoreflect.Message { // Deprecated: Use DatasetPropertyFilter.ProtoReflect.Descriptor instead. func (*DatasetPropertyFilter) Descriptor() ([]byte, []int) { - return file_flyteidl_datacatalog_datacatalog_proto_rawDescGZIP(), []int{35} + return file_flyteidl_datacatalog_datacatalog_proto_rawDescGZIP(), []int{37} } func (m *DatasetPropertyFilter) GetProperty() isDatasetPropertyFilter_Property { @@ -2459,7 +2591,7 @@ type PaginationOptions struct { func (x *PaginationOptions) Reset() { *x = PaginationOptions{} if protoimpl.UnsafeEnabled { - mi := &file_flyteidl_datacatalog_datacatalog_proto_msgTypes[36] + mi := &file_flyteidl_datacatalog_datacatalog_proto_msgTypes[38] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2472,7 +2604,7 @@ func (x *PaginationOptions) String() string { func (*PaginationOptions) ProtoMessage() {} func (x *PaginationOptions) ProtoReflect() protoreflect.Message { - mi := &file_flyteidl_datacatalog_datacatalog_proto_msgTypes[36] + mi := &file_flyteidl_datacatalog_datacatalog_proto_msgTypes[38] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2485,7 +2617,7 @@ func (x *PaginationOptions) ProtoReflect() protoreflect.Message { // Deprecated: Use PaginationOptions.ProtoReflect.Descriptor instead. func (*PaginationOptions) Descriptor() ([]byte, []int) { - return file_flyteidl_datacatalog_datacatalog_proto_rawDescGZIP(), []int{36} + return file_flyteidl_datacatalog_datacatalog_proto_rawDescGZIP(), []int{38} } func (x *PaginationOptions) GetLimit() uint32 { @@ -2622,269 +2754,286 @@ var file_flyteidl_datacatalog_datacatalog_proto_rawDesc = []byte{ 0x65, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x61, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x61, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, - 0x49, 0x64, 0x22, 0x61, 0x0a, 0x0d, 0x52, 0x65, 0x73, 0x65, 0x72, 0x76, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x49, 0x44, 0x12, 0x35, 0x0a, 0x0a, 0x64, 0x61, 0x74, 0x61, 0x73, 0x65, 0x74, 0x5f, 0x69, - 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x63, 0x61, - 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x73, 0x65, 0x74, 0x49, 0x44, 0x52, - 0x09, 0x64, 0x61, 0x74, 0x61, 0x73, 0x65, 0x74, 0x49, 0x64, 0x12, 0x19, 0x0a, 0x08, 0x74, 0x61, - 0x67, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x74, 0x61, - 0x67, 0x4e, 0x61, 0x6d, 0x65, 0x22, 0xc7, 0x01, 0x0a, 0x1d, 0x47, 0x65, 0x74, 0x4f, 0x72, 0x45, - 0x78, 0x74, 0x65, 0x6e, 0x64, 0x52, 0x65, 0x73, 0x65, 0x72, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x41, 0x0a, 0x0e, 0x72, 0x65, 0x73, 0x65, 0x72, - 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x1a, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x2e, 0x52, 0x65, - 0x73, 0x65, 0x72, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x52, 0x0d, 0x72, 0x65, 0x73, - 0x65, 0x72, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x19, 0x0a, 0x08, 0x6f, 0x77, - 0x6e, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6f, 0x77, - 0x6e, 0x65, 0x72, 0x49, 0x64, 0x12, 0x48, 0x0a, 0x12, 0x68, 0x65, 0x61, 0x72, 0x74, 0x62, 0x65, - 0x61, 0x74, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x11, 0x68, 0x65, - 0x61, 0x72, 0x74, 0x62, 0x65, 0x61, 0x74, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x22, - 0xa3, 0x02, 0x0a, 0x0b, 0x52, 0x65, 0x73, 0x65, 0x72, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, - 0x41, 0x0a, 0x0e, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, - 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x63, 0x61, - 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x2e, 0x52, 0x65, 0x73, 0x65, 0x72, 0x76, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x49, 0x44, 0x52, 0x0d, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x49, 0x64, 0x12, 0x19, 0x0a, 0x08, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x49, 0x64, 0x12, 0x48, 0x0a, - 0x12, 0x68, 0x65, 0x61, 0x72, 0x74, 0x62, 0x65, 0x61, 0x74, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, - 0x76, 0x61, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, - 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x11, 0x68, 0x65, 0x61, 0x72, 0x74, 0x62, 0x65, 0x61, 0x74, 0x49, - 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x12, 0x39, 0x0a, 0x0a, 0x65, 0x78, 0x70, 0x69, 0x72, - 0x65, 0x73, 0x5f, 0x61, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, - 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, - 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x65, 0x78, 0x70, 0x69, 0x72, 0x65, 0x73, - 0x41, 0x74, 0x12, 0x31, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x06, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x63, 0x61, 0x74, 0x61, 0x6c, - 0x6f, 0x67, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x08, 0x6d, 0x65, 0x74, - 0x61, 0x64, 0x61, 0x74, 0x61, 0x22, 0x5c, 0x0a, 0x1e, 0x47, 0x65, 0x74, 0x4f, 0x72, 0x45, 0x78, - 0x74, 0x65, 0x6e, 0x64, 0x52, 0x65, 0x73, 0x65, 0x72, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3a, 0x0a, 0x0b, 0x72, 0x65, 0x73, 0x65, 0x72, - 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x64, - 0x61, 0x74, 0x61, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x2e, 0x52, 0x65, 0x73, 0x65, 0x72, - 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0b, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x22, 0x79, 0x0a, 0x19, 0x52, 0x65, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x52, 0x65, - 0x73, 0x65, 0x72, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x12, 0x41, 0x0a, 0x0e, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, - 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x63, - 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x2e, 0x52, 0x65, 0x73, 0x65, 0x72, 0x76, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x49, 0x44, 0x52, 0x0d, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x49, 0x64, 0x12, 0x19, 0x0a, 0x08, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x49, 0x64, 0x22, 0x1c, - 0x0a, 0x1a, 0x52, 0x65, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x52, 0x65, 0x73, 0x65, 0x72, 0x76, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x8a, 0x01, 0x0a, - 0x07, 0x44, 0x61, 0x74, 0x61, 0x73, 0x65, 0x74, 0x12, 0x26, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x63, 0x61, 0x74, 0x61, 0x6c, - 0x6f, 0x67, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x73, 0x65, 0x74, 0x49, 0x44, 0x52, 0x02, 0x69, 0x64, - 0x12, 0x31, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, - 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, - 0x61, 0x74, 0x61, 0x12, 0x24, 0x0a, 0x0d, 0x70, 0x61, 0x72, 0x74, 0x69, 0x74, 0x69, 0x6f, 0x6e, - 0x4b, 0x65, 0x79, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0d, 0x70, 0x61, 0x72, 0x74, - 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x4b, 0x65, 0x79, 0x73, 0x22, 0x33, 0x0a, 0x09, 0x50, 0x61, 0x72, - 0x74, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, - 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x91, - 0x01, 0x0a, 0x09, 0x44, 0x61, 0x74, 0x61, 0x73, 0x65, 0x74, 0x49, 0x44, 0x12, 0x18, 0x0a, 0x07, - 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x70, - 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x64, 0x6f, - 0x6d, 0x61, 0x69, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x64, 0x6f, 0x6d, 0x61, - 0x69, 0x6e, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x12, 0x0a, 0x04, - 0x55, 0x55, 0x49, 0x44, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x55, 0x55, 0x49, 0x44, - 0x12, 0x10, 0x0a, 0x03, 0x6f, 0x72, 0x67, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6f, - 0x72, 0x67, 0x22, 0xc7, 0x02, 0x0a, 0x08, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x12, - 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, - 0x30, 0x0a, 0x07, 0x64, 0x61, 0x74, 0x61, 0x73, 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x16, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x2e, 0x44, - 0x61, 0x74, 0x61, 0x73, 0x65, 0x74, 0x49, 0x44, 0x52, 0x07, 0x64, 0x61, 0x74, 0x61, 0x73, 0x65, - 0x74, 0x12, 0x2d, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, - 0x19, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x2e, 0x41, 0x72, - 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x44, 0x61, 0x74, 0x61, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, - 0x12, 0x31, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x04, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, - 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, - 0x61, 0x74, 0x61, 0x12, 0x36, 0x0a, 0x0a, 0x70, 0x61, 0x72, 0x74, 0x69, 0x74, 0x69, 0x6f, 0x6e, - 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x63, 0x61, - 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x2e, 0x50, 0x61, 0x72, 0x74, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, - 0x0a, 0x70, 0x61, 0x72, 0x74, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x24, 0x0a, 0x04, 0x74, - 0x61, 0x67, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x64, 0x61, 0x74, 0x61, - 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x2e, 0x54, 0x61, 0x67, 0x52, 0x04, 0x74, 0x61, 0x67, - 0x73, 0x12, 0x39, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, - 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, - 0x70, 0x52, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x22, 0x50, 0x0a, 0x0c, - 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x44, 0x61, 0x74, 0x61, 0x12, 0x12, 0x0a, 0x04, - 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, - 0x12, 0x2c, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x16, 0x2e, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, - 0x4c, 0x69, 0x74, 0x65, 0x72, 0x61, 0x6c, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x6c, - 0x0a, 0x03, 0x54, 0x61, 0x67, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x61, 0x72, 0x74, - 0x69, 0x66, 0x61, 0x63, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, - 0x61, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x49, 0x64, 0x12, 0x30, 0x0a, 0x07, 0x64, 0x61, - 0x74, 0x61, 0x73, 0x65, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x64, 0x61, - 0x74, 0x61, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x73, 0x65, - 0x74, 0x49, 0x44, 0x52, 0x07, 0x64, 0x61, 0x74, 0x61, 0x73, 0x65, 0x74, 0x22, 0x81, 0x01, 0x0a, - 0x08, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x3a, 0x0a, 0x07, 0x6b, 0x65, 0x79, - 0x5f, 0x6d, 0x61, 0x70, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x64, 0x61, 0x74, + 0x49, 0x64, 0x22, 0x99, 0x01, 0x0a, 0x15, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x41, 0x72, 0x74, + 0x69, 0x66, 0x61, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x30, 0x0a, 0x07, + 0x64, 0x61, 0x74, 0x61, 0x73, 0x65, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, + 0x64, 0x61, 0x74, 0x61, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x2e, 0x44, 0x61, 0x74, 0x61, + 0x73, 0x65, 0x74, 0x49, 0x44, 0x52, 0x07, 0x64, 0x61, 0x74, 0x61, 0x73, 0x65, 0x74, 0x12, 0x21, + 0x0a, 0x0b, 0x61, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x0a, 0x61, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x49, + 0x64, 0x12, 0x1b, 0x0a, 0x08, 0x74, 0x61, 0x67, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x07, 0x74, 0x61, 0x67, 0x4e, 0x61, 0x6d, 0x65, 0x42, 0x0e, + 0x0a, 0x0c, 0x71, 0x75, 0x65, 0x72, 0x79, 0x5f, 0x68, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x22, 0x18, + 0x0a, 0x16, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x61, 0x0a, 0x0d, 0x52, 0x65, 0x73, 0x65, + 0x72, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x12, 0x35, 0x0a, 0x0a, 0x64, 0x61, 0x74, + 0x61, 0x73, 0x65, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, + 0x64, 0x61, 0x74, 0x61, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x2e, 0x44, 0x61, 0x74, 0x61, + 0x73, 0x65, 0x74, 0x49, 0x44, 0x52, 0x09, 0x64, 0x61, 0x74, 0x61, 0x73, 0x65, 0x74, 0x49, 0x64, + 0x12, 0x19, 0x0a, 0x08, 0x74, 0x61, 0x67, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x07, 0x74, 0x61, 0x67, 0x4e, 0x61, 0x6d, 0x65, 0x22, 0xc7, 0x01, 0x0a, 0x1d, + 0x47, 0x65, 0x74, 0x4f, 0x72, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x64, 0x52, 0x65, 0x73, 0x65, 0x72, + 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x41, 0x0a, + 0x0e, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x63, 0x61, 0x74, 0x61, + 0x6c, 0x6f, 0x67, 0x2e, 0x52, 0x65, 0x73, 0x65, 0x72, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, + 0x44, 0x52, 0x0d, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, + 0x12, 0x19, 0x0a, 0x08, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x07, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x49, 0x64, 0x12, 0x48, 0x0a, 0x12, 0x68, + 0x65, 0x61, 0x72, 0x74, 0x62, 0x65, 0x61, 0x74, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, + 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x52, 0x11, 0x68, 0x65, 0x61, 0x72, 0x74, 0x62, 0x65, 0x61, 0x74, 0x49, 0x6e, 0x74, + 0x65, 0x72, 0x76, 0x61, 0x6c, 0x22, 0xa3, 0x02, 0x0a, 0x0b, 0x52, 0x65, 0x73, 0x65, 0x72, 0x76, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x41, 0x0a, 0x0e, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, + 0x64, 0x61, 0x74, 0x61, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x2e, 0x52, 0x65, 0x73, 0x65, + 0x72, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x52, 0x0d, 0x72, 0x65, 0x73, 0x65, 0x72, + 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x19, 0x0a, 0x08, 0x6f, 0x77, 0x6e, 0x65, + 0x72, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6f, 0x77, 0x6e, 0x65, + 0x72, 0x49, 0x64, 0x12, 0x48, 0x0a, 0x12, 0x68, 0x65, 0x61, 0x72, 0x74, 0x62, 0x65, 0x61, 0x74, + 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, + 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x11, 0x68, 0x65, 0x61, 0x72, + 0x74, 0x62, 0x65, 0x61, 0x74, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x12, 0x39, 0x0a, + 0x0a, 0x65, 0x78, 0x70, 0x69, 0x72, 0x65, 0x73, 0x5f, 0x61, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x65, + 0x78, 0x70, 0x69, 0x72, 0x65, 0x73, 0x41, 0x74, 0x12, 0x31, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, + 0x64, 0x61, 0x74, 0x61, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, - 0x61, 0x2e, 0x4b, 0x65, 0x79, 0x4d, 0x61, 0x70, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x06, 0x6b, - 0x65, 0x79, 0x4d, 0x61, 0x70, 0x1a, 0x39, 0x0a, 0x0b, 0x4b, 0x65, 0x79, 0x4d, 0x61, 0x70, 0x45, - 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, - 0x22, 0x4f, 0x0a, 0x10, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x45, 0x78, 0x70, 0x72, 0x65, 0x73, - 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x3b, 0x0a, 0x07, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x18, - 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x63, 0x61, 0x74, 0x61, - 0x6c, 0x6f, 0x67, 0x2e, 0x53, 0x69, 0x6e, 0x67, 0x6c, 0x65, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, - 0x74, 0x79, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x52, 0x07, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, - 0x73, 0x22, 0xce, 0x03, 0x0a, 0x14, 0x53, 0x69, 0x6e, 0x67, 0x6c, 0x65, 0x50, 0x72, 0x6f, 0x70, - 0x65, 0x72, 0x74, 0x79, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x12, 0x3f, 0x0a, 0x0a, 0x74, 0x61, - 0x67, 0x5f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, - 0x2e, 0x64, 0x61, 0x74, 0x61, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x2e, 0x54, 0x61, 0x67, - 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x48, 0x00, - 0x52, 0x09, 0x74, 0x61, 0x67, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x12, 0x51, 0x0a, 0x10, 0x70, - 0x61, 0x72, 0x74, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x63, 0x61, 0x74, 0x61, - 0x6c, 0x6f, 0x67, 0x2e, 0x50, 0x61, 0x72, 0x74, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, - 0x70, 0x65, 0x72, 0x74, 0x79, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x48, 0x00, 0x52, 0x0f, 0x70, - 0x61, 0x72, 0x74, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x12, 0x4e, - 0x0a, 0x0f, 0x61, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x5f, 0x66, 0x69, 0x6c, 0x74, 0x65, - 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x63, 0x61, - 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x2e, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x50, 0x72, - 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x48, 0x00, 0x52, 0x0e, - 0x61, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x12, 0x4b, - 0x0a, 0x0e, 0x64, 0x61, 0x74, 0x61, 0x73, 0x65, 0x74, 0x5f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, - 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x63, 0x61, 0x74, - 0x61, 0x6c, 0x6f, 0x67, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x73, 0x65, 0x74, 0x50, 0x72, 0x6f, 0x70, - 0x65, 0x72, 0x74, 0x79, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x48, 0x00, 0x52, 0x0d, 0x64, 0x61, - 0x74, 0x61, 0x73, 0x65, 0x74, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x12, 0x50, 0x0a, 0x08, 0x6f, - 0x70, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x34, 0x2e, - 0x64, 0x61, 0x74, 0x61, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x2e, 0x53, 0x69, 0x6e, 0x67, + 0x61, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x22, 0x5c, 0x0a, 0x1e, 0x47, + 0x65, 0x74, 0x4f, 0x72, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x64, 0x52, 0x65, 0x73, 0x65, 0x72, 0x76, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3a, 0x0a, + 0x0b, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, + 0x2e, 0x52, 0x65, 0x73, 0x65, 0x72, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0b, 0x72, 0x65, + 0x73, 0x65, 0x72, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x79, 0x0a, 0x19, 0x52, 0x65, 0x6c, + 0x65, 0x61, 0x73, 0x65, 0x52, 0x65, 0x73, 0x65, 0x72, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x41, 0x0a, 0x0e, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, + 0x2e, 0x64, 0x61, 0x74, 0x61, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x2e, 0x52, 0x65, 0x73, + 0x65, 0x72, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x52, 0x0d, 0x72, 0x65, 0x73, 0x65, + 0x72, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x19, 0x0a, 0x08, 0x6f, 0x77, 0x6e, + 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6f, 0x77, 0x6e, + 0x65, 0x72, 0x49, 0x64, 0x22, 0x1c, 0x0a, 0x1a, 0x52, 0x65, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x52, + 0x65, 0x73, 0x65, 0x72, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x22, 0x8a, 0x01, 0x0a, 0x07, 0x44, 0x61, 0x74, 0x61, 0x73, 0x65, 0x74, 0x12, 0x26, + 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x64, 0x61, 0x74, + 0x61, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x73, 0x65, 0x74, + 0x49, 0x44, 0x52, 0x02, 0x69, 0x64, 0x12, 0x31, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, + 0x74, 0x61, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x63, + 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, + 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x24, 0x0a, 0x0d, 0x70, 0x61, 0x72, + 0x74, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x4b, 0x65, 0x79, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, + 0x52, 0x0d, 0x70, 0x61, 0x72, 0x74, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x4b, 0x65, 0x79, 0x73, 0x22, + 0x33, 0x0a, 0x09, 0x50, 0x61, 0x72, 0x74, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x10, 0x0a, 0x03, + 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, + 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, + 0x61, 0x6c, 0x75, 0x65, 0x22, 0x91, 0x01, 0x0a, 0x09, 0x44, 0x61, 0x74, 0x61, 0x73, 0x65, 0x74, + 0x49, 0x44, 0x12, 0x18, 0x0a, 0x07, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x07, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x12, 0x0a, 0x04, + 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, + 0x12, 0x16, 0x0a, 0x06, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x06, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, + 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, + 0x6f, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x55, 0x55, 0x49, 0x44, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x04, 0x55, 0x55, 0x49, 0x44, 0x12, 0x10, 0x0a, 0x03, 0x6f, 0x72, 0x67, 0x18, 0x06, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x03, 0x6f, 0x72, 0x67, 0x22, 0xc7, 0x02, 0x0a, 0x08, 0x41, 0x72, 0x74, + 0x69, 0x66, 0x61, 0x63, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x30, 0x0a, 0x07, 0x64, 0x61, 0x74, 0x61, 0x73, 0x65, 0x74, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x63, 0x61, 0x74, + 0x61, 0x6c, 0x6f, 0x67, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x73, 0x65, 0x74, 0x49, 0x44, 0x52, 0x07, + 0x64, 0x61, 0x74, 0x61, 0x73, 0x65, 0x74, 0x12, 0x2d, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, + 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x63, 0x61, 0x74, 0x61, + 0x6c, 0x6f, 0x67, 0x2e, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x44, 0x61, 0x74, 0x61, + 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x12, 0x31, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, + 0x74, 0x61, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x63, + 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, + 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x36, 0x0a, 0x0a, 0x70, 0x61, 0x72, + 0x74, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, + 0x64, 0x61, 0x74, 0x61, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x2e, 0x50, 0x61, 0x72, 0x74, + 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0a, 0x70, 0x61, 0x72, 0x74, 0x69, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x12, 0x24, 0x0a, 0x04, 0x74, 0x61, 0x67, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x10, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x2e, 0x54, 0x61, + 0x67, 0x52, 0x04, 0x74, 0x61, 0x67, 0x73, 0x12, 0x39, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, + 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, + 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, + 0x41, 0x74, 0x22, 0x50, 0x0a, 0x0c, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x44, 0x61, + 0x74, 0x61, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x2c, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, + 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x4c, 0x69, 0x74, 0x65, 0x72, 0x61, 0x6c, 0x52, 0x05, 0x76, + 0x61, 0x6c, 0x75, 0x65, 0x22, 0x6c, 0x0a, 0x03, 0x54, 0x61, 0x67, 0x12, 0x12, 0x0a, 0x04, 0x6e, + 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, + 0x1f, 0x0a, 0x0b, 0x61, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x61, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x49, 0x64, + 0x12, 0x30, 0x0a, 0x07, 0x64, 0x61, 0x74, 0x61, 0x73, 0x65, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x16, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x2e, + 0x44, 0x61, 0x74, 0x61, 0x73, 0x65, 0x74, 0x49, 0x44, 0x52, 0x07, 0x64, 0x61, 0x74, 0x61, 0x73, + 0x65, 0x74, 0x22, 0x81, 0x01, 0x0a, 0x08, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, + 0x3a, 0x0a, 0x07, 0x6b, 0x65, 0x79, 0x5f, 0x6d, 0x61, 0x70, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x21, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x2e, 0x4d, + 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x4b, 0x65, 0x79, 0x4d, 0x61, 0x70, 0x45, 0x6e, + 0x74, 0x72, 0x79, 0x52, 0x06, 0x6b, 0x65, 0x79, 0x4d, 0x61, 0x70, 0x1a, 0x39, 0x0a, 0x0b, 0x4b, + 0x65, 0x79, 0x4d, 0x61, 0x70, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, + 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, + 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, + 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x4f, 0x0a, 0x10, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, + 0x45, 0x78, 0x70, 0x72, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x3b, 0x0a, 0x07, 0x66, 0x69, + 0x6c, 0x74, 0x65, 0x72, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x64, 0x61, + 0x74, 0x61, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x2e, 0x53, 0x69, 0x6e, 0x67, 0x6c, 0x65, + 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x52, 0x07, + 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x22, 0xce, 0x03, 0x0a, 0x14, 0x53, 0x69, 0x6e, 0x67, 0x6c, 0x65, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, - 0x2e, 0x43, 0x6f, 0x6d, 0x70, 0x61, 0x72, 0x69, 0x73, 0x6f, 0x6e, 0x4f, 0x70, 0x65, 0x72, 0x61, - 0x74, 0x6f, 0x72, 0x52, 0x08, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x22, 0x20, 0x0a, - 0x12, 0x43, 0x6f, 0x6d, 0x70, 0x61, 0x72, 0x69, 0x73, 0x6f, 0x6e, 0x4f, 0x70, 0x65, 0x72, 0x61, - 0x74, 0x6f, 0x72, 0x12, 0x0a, 0x0a, 0x06, 0x45, 0x51, 0x55, 0x41, 0x4c, 0x53, 0x10, 0x00, 0x42, - 0x11, 0x0a, 0x0f, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x5f, 0x66, 0x69, 0x6c, 0x74, - 0x65, 0x72, 0x22, 0x47, 0x0a, 0x16, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x50, 0x72, - 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x12, 0x21, 0x0a, 0x0b, - 0x61, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x48, 0x00, 0x52, 0x0a, 0x61, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x49, 0x64, 0x42, - 0x0a, 0x0a, 0x08, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x22, 0x3c, 0x0a, 0x11, 0x54, - 0x61, 0x67, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, - 0x12, 0x1b, 0x0a, 0x08, 0x74, 0x61, 0x67, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x48, 0x00, 0x52, 0x07, 0x74, 0x61, 0x67, 0x4e, 0x61, 0x6d, 0x65, 0x42, 0x0a, 0x0a, - 0x08, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x22, 0x5b, 0x0a, 0x17, 0x50, 0x61, 0x72, - 0x74, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x46, 0x69, - 0x6c, 0x74, 0x65, 0x72, 0x12, 0x34, 0x0a, 0x07, 0x6b, 0x65, 0x79, 0x5f, 0x76, 0x61, 0x6c, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x63, 0x61, 0x74, 0x61, - 0x6c, 0x6f, 0x67, 0x2e, 0x4b, 0x65, 0x79, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x50, 0x61, 0x69, 0x72, - 0x48, 0x00, 0x52, 0x06, 0x6b, 0x65, 0x79, 0x56, 0x61, 0x6c, 0x42, 0x0a, 0x0a, 0x08, 0x70, 0x72, - 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x22, 0x36, 0x0a, 0x0c, 0x4b, 0x65, 0x79, 0x56, 0x61, 0x6c, - 0x75, 0x65, 0x50, 0x61, 0x69, 0x72, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, - 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x9f, - 0x01, 0x0a, 0x15, 0x44, 0x61, 0x74, 0x61, 0x73, 0x65, 0x74, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, - 0x74, 0x79, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x12, 0x1a, 0x0a, 0x07, 0x70, 0x72, 0x6f, 0x6a, - 0x65, 0x63, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x07, 0x70, 0x72, 0x6f, - 0x6a, 0x65, 0x63, 0x74, 0x12, 0x14, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x09, 0x48, 0x00, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x18, 0x0a, 0x06, 0x64, 0x6f, - 0x6d, 0x61, 0x69, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x06, 0x64, 0x6f, - 0x6d, 0x61, 0x69, 0x6e, 0x12, 0x1a, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, - 0x04, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, - 0x12, 0x12, 0x0a, 0x03, 0x6f, 0x72, 0x67, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, - 0x03, 0x6f, 0x72, 0x67, 0x42, 0x0a, 0x0a, 0x08, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, - 0x22, 0x93, 0x02, 0x0a, 0x11, 0x50, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4f, - 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x05, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x12, 0x14, 0x0a, 0x05, - 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x6f, 0x6b, - 0x65, 0x6e, 0x12, 0x40, 0x0a, 0x07, 0x73, 0x6f, 0x72, 0x74, 0x4b, 0x65, 0x79, 0x18, 0x03, 0x20, - 0x01, 0x28, 0x0e, 0x32, 0x26, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, - 0x67, 0x2e, 0x50, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4f, 0x70, 0x74, 0x69, - 0x6f, 0x6e, 0x73, 0x2e, 0x53, 0x6f, 0x72, 0x74, 0x4b, 0x65, 0x79, 0x52, 0x07, 0x73, 0x6f, 0x72, - 0x74, 0x4b, 0x65, 0x79, 0x12, 0x46, 0x0a, 0x09, 0x73, 0x6f, 0x72, 0x74, 0x4f, 0x72, 0x64, 0x65, - 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x28, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x63, 0x61, - 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x2e, 0x50, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x53, 0x6f, 0x72, 0x74, 0x4f, 0x72, 0x64, 0x65, - 0x72, 0x52, 0x09, 0x73, 0x6f, 0x72, 0x74, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x22, 0x2a, 0x0a, 0x09, - 0x53, 0x6f, 0x72, 0x74, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x12, 0x0e, 0x0a, 0x0a, 0x44, 0x45, 0x53, - 0x43, 0x45, 0x4e, 0x44, 0x49, 0x4e, 0x47, 0x10, 0x00, 0x12, 0x0d, 0x0a, 0x09, 0x41, 0x53, 0x43, - 0x45, 0x4e, 0x44, 0x49, 0x4e, 0x47, 0x10, 0x01, 0x22, 0x1c, 0x0a, 0x07, 0x53, 0x6f, 0x72, 0x74, - 0x4b, 0x65, 0x79, 0x12, 0x11, 0x0a, 0x0d, 0x43, 0x52, 0x45, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, - 0x54, 0x49, 0x4d, 0x45, 0x10, 0x00, 0x32, 0x86, 0x07, 0x0a, 0x0b, 0x44, 0x61, 0x74, 0x61, 0x43, - 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x12, 0x56, 0x0a, 0x0d, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, - 0x44, 0x61, 0x74, 0x61, 0x73, 0x65, 0x74, 0x12, 0x21, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x63, 0x61, - 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x44, 0x61, 0x74, 0x61, - 0x73, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22, 0x2e, 0x64, 0x61, 0x74, - 0x61, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x44, - 0x61, 0x74, 0x61, 0x73, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4d, - 0x0a, 0x0a, 0x47, 0x65, 0x74, 0x44, 0x61, 0x74, 0x61, 0x73, 0x65, 0x74, 0x12, 0x1e, 0x2e, 0x64, - 0x61, 0x74, 0x61, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x2e, 0x47, 0x65, 0x74, 0x44, 0x61, - 0x74, 0x61, 0x73, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e, 0x64, - 0x61, 0x74, 0x61, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x2e, 0x47, 0x65, 0x74, 0x44, 0x61, - 0x74, 0x61, 0x73, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x59, 0x0a, - 0x0e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x12, - 0x22, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x2e, 0x43, 0x72, - 0x65, 0x61, 0x74, 0x65, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x1a, 0x23, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, - 0x67, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x50, 0x0a, 0x0b, 0x47, 0x65, 0x74, 0x41, - 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x12, 0x1f, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x63, 0x61, - 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, - 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x63, - 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, - 0x63, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x41, 0x0a, 0x06, 0x41, 0x64, - 0x64, 0x54, 0x61, 0x67, 0x12, 0x1a, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x63, 0x61, 0x74, 0x61, 0x6c, - 0x6f, 0x67, 0x2e, 0x41, 0x64, 0x64, 0x54, 0x61, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x1b, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x2e, 0x41, - 0x64, 0x64, 0x54, 0x61, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x56, 0x0a, - 0x0d, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x73, 0x12, 0x21, - 0x2e, 0x64, 0x61, 0x74, 0x61, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x2e, 0x4c, 0x69, 0x73, - 0x74, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x1a, 0x22, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x2e, - 0x4c, 0x69, 0x73, 0x74, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x73, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x53, 0x0a, 0x0c, 0x4c, 0x69, 0x73, 0x74, 0x44, 0x61, 0x74, - 0x61, 0x73, 0x65, 0x74, 0x73, 0x12, 0x20, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x63, 0x61, 0x74, 0x61, - 0x6c, 0x6f, 0x67, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x44, 0x61, 0x74, 0x61, 0x73, 0x65, 0x74, 0x73, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x63, 0x61, - 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x44, 0x61, 0x74, 0x61, 0x73, 0x65, - 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x59, 0x0a, 0x0e, 0x55, 0x70, - 0x64, 0x61, 0x74, 0x65, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x12, 0x22, 0x2e, 0x64, - 0x61, 0x74, 0x61, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, - 0x65, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x23, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x2e, 0x55, - 0x70, 0x64, 0x61, 0x74, 0x65, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x71, 0x0a, 0x16, 0x47, 0x65, 0x74, 0x4f, 0x72, 0x45, 0x78, - 0x74, 0x65, 0x6e, 0x64, 0x52, 0x65, 0x73, 0x65, 0x72, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, - 0x2a, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x2e, 0x47, 0x65, - 0x74, 0x4f, 0x72, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x64, 0x52, 0x65, 0x73, 0x65, 0x72, 0x76, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2b, 0x2e, 0x64, 0x61, - 0x74, 0x61, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x2e, 0x47, 0x65, 0x74, 0x4f, 0x72, 0x45, + 0x12, 0x3f, 0x0a, 0x0a, 0x74, 0x61, 0x67, 0x5f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x63, 0x61, 0x74, 0x61, 0x6c, + 0x6f, 0x67, 0x2e, 0x54, 0x61, 0x67, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x46, 0x69, + 0x6c, 0x74, 0x65, 0x72, 0x48, 0x00, 0x52, 0x09, 0x74, 0x61, 0x67, 0x46, 0x69, 0x6c, 0x74, 0x65, + 0x72, 0x12, 0x51, 0x0a, 0x10, 0x70, 0x61, 0x72, 0x74, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x66, + 0x69, 0x6c, 0x74, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x64, 0x61, + 0x74, 0x61, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x2e, 0x50, 0x61, 0x72, 0x74, 0x69, 0x74, + 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x46, 0x69, 0x6c, 0x74, 0x65, + 0x72, 0x48, 0x00, 0x52, 0x0f, 0x70, 0x61, 0x72, 0x74, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x46, 0x69, + 0x6c, 0x74, 0x65, 0x72, 0x12, 0x4e, 0x0a, 0x0f, 0x61, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, + 0x5f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, + 0x64, 0x61, 0x74, 0x61, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x2e, 0x41, 0x72, 0x74, 0x69, + 0x66, 0x61, 0x63, 0x74, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x46, 0x69, 0x6c, 0x74, + 0x65, 0x72, 0x48, 0x00, 0x52, 0x0e, 0x61, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x46, 0x69, + 0x6c, 0x74, 0x65, 0x72, 0x12, 0x4b, 0x0a, 0x0e, 0x64, 0x61, 0x74, 0x61, 0x73, 0x65, 0x74, 0x5f, + 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x64, + 0x61, 0x74, 0x61, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x73, + 0x65, 0x74, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, + 0x48, 0x00, 0x52, 0x0d, 0x64, 0x61, 0x74, 0x61, 0x73, 0x65, 0x74, 0x46, 0x69, 0x6c, 0x74, 0x65, + 0x72, 0x12, 0x50, 0x0a, 0x08, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x18, 0x0a, 0x20, + 0x01, 0x28, 0x0e, 0x32, 0x34, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, + 0x67, 0x2e, 0x53, 0x69, 0x6e, 0x67, 0x6c, 0x65, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, + 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x43, 0x6f, 0x6d, 0x70, 0x61, 0x72, 0x69, 0x73, 0x6f, + 0x6e, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x52, 0x08, 0x6f, 0x70, 0x65, 0x72, 0x61, + 0x74, 0x6f, 0x72, 0x22, 0x20, 0x0a, 0x12, 0x43, 0x6f, 0x6d, 0x70, 0x61, 0x72, 0x69, 0x73, 0x6f, + 0x6e, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x12, 0x0a, 0x0a, 0x06, 0x45, 0x51, 0x55, + 0x41, 0x4c, 0x53, 0x10, 0x00, 0x42, 0x11, 0x0a, 0x0f, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, + 0x79, 0x5f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x22, 0x47, 0x0a, 0x16, 0x41, 0x72, 0x74, 0x69, + 0x66, 0x61, 0x63, 0x74, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x46, 0x69, 0x6c, 0x74, + 0x65, 0x72, 0x12, 0x21, 0x0a, 0x0b, 0x61, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x5f, 0x69, + 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x0a, 0x61, 0x72, 0x74, 0x69, 0x66, + 0x61, 0x63, 0x74, 0x49, 0x64, 0x42, 0x0a, 0x0a, 0x08, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, + 0x79, 0x22, 0x3c, 0x0a, 0x11, 0x54, 0x61, 0x67, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, + 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x12, 0x1b, 0x0a, 0x08, 0x74, 0x61, 0x67, 0x5f, 0x6e, 0x61, + 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x07, 0x74, 0x61, 0x67, 0x4e, + 0x61, 0x6d, 0x65, 0x42, 0x0a, 0x0a, 0x08, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x22, + 0x5b, 0x0a, 0x17, 0x50, 0x61, 0x72, 0x74, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x70, + 0x65, 0x72, 0x74, 0x79, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x12, 0x34, 0x0a, 0x07, 0x6b, 0x65, + 0x79, 0x5f, 0x76, 0x61, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x64, 0x61, + 0x74, 0x61, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x2e, 0x4b, 0x65, 0x79, 0x56, 0x61, 0x6c, + 0x75, 0x65, 0x50, 0x61, 0x69, 0x72, 0x48, 0x00, 0x52, 0x06, 0x6b, 0x65, 0x79, 0x56, 0x61, 0x6c, + 0x42, 0x0a, 0x0a, 0x08, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x22, 0x36, 0x0a, 0x0c, + 0x4b, 0x65, 0x79, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x50, 0x61, 0x69, 0x72, 0x12, 0x10, 0x0a, 0x03, + 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, + 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, + 0x61, 0x6c, 0x75, 0x65, 0x22, 0x9f, 0x01, 0x0a, 0x15, 0x44, 0x61, 0x74, 0x61, 0x73, 0x65, 0x74, + 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x12, 0x1a, + 0x0a, 0x07, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, + 0x00, 0x52, 0x07, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x14, 0x0a, 0x04, 0x6e, 0x61, + 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, + 0x12, 0x18, 0x0a, 0x06, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, + 0x48, 0x00, 0x52, 0x06, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x12, 0x1a, 0x0a, 0x07, 0x76, 0x65, + 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x07, 0x76, + 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x12, 0x0a, 0x03, 0x6f, 0x72, 0x67, 0x18, 0x05, 0x20, + 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x03, 0x6f, 0x72, 0x67, 0x42, 0x0a, 0x0a, 0x08, 0x70, 0x72, + 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x22, 0x93, 0x02, 0x0a, 0x11, 0x50, 0x61, 0x67, 0x69, 0x6e, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x14, 0x0a, 0x05, + 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x05, 0x6c, 0x69, 0x6d, + 0x69, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x40, 0x0a, 0x07, 0x73, 0x6f, 0x72, 0x74, + 0x4b, 0x65, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x26, 0x2e, 0x64, 0x61, 0x74, 0x61, + 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x2e, 0x50, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x53, 0x6f, 0x72, 0x74, 0x4b, 0x65, + 0x79, 0x52, 0x07, 0x73, 0x6f, 0x72, 0x74, 0x4b, 0x65, 0x79, 0x12, 0x46, 0x0a, 0x09, 0x73, 0x6f, + 0x72, 0x74, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x28, 0x2e, + 0x64, 0x61, 0x74, 0x61, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x2e, 0x50, 0x61, 0x67, 0x69, + 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x53, 0x6f, + 0x72, 0x74, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x52, 0x09, 0x73, 0x6f, 0x72, 0x74, 0x4f, 0x72, 0x64, + 0x65, 0x72, 0x22, 0x2a, 0x0a, 0x09, 0x53, 0x6f, 0x72, 0x74, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x12, + 0x0e, 0x0a, 0x0a, 0x44, 0x45, 0x53, 0x43, 0x45, 0x4e, 0x44, 0x49, 0x4e, 0x47, 0x10, 0x00, 0x12, + 0x0d, 0x0a, 0x09, 0x41, 0x53, 0x43, 0x45, 0x4e, 0x44, 0x49, 0x4e, 0x47, 0x10, 0x01, 0x22, 0x1c, + 0x0a, 0x07, 0x53, 0x6f, 0x72, 0x74, 0x4b, 0x65, 0x79, 0x12, 0x11, 0x0a, 0x0d, 0x43, 0x52, 0x45, + 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x54, 0x49, 0x4d, 0x45, 0x10, 0x00, 0x32, 0xe1, 0x07, 0x0a, + 0x0b, 0x44, 0x61, 0x74, 0x61, 0x43, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x12, 0x56, 0x0a, 0x0d, + 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x44, 0x61, 0x74, 0x61, 0x73, 0x65, 0x74, 0x12, 0x21, 0x2e, + 0x64, 0x61, 0x74, 0x61, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x2e, 0x43, 0x72, 0x65, 0x61, + 0x74, 0x65, 0x44, 0x61, 0x74, 0x61, 0x73, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x22, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x2e, 0x43, + 0x72, 0x65, 0x61, 0x74, 0x65, 0x44, 0x61, 0x74, 0x61, 0x73, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4d, 0x0a, 0x0a, 0x47, 0x65, 0x74, 0x44, 0x61, 0x74, 0x61, 0x73, + 0x65, 0x74, 0x12, 0x1e, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, + 0x2e, 0x47, 0x65, 0x74, 0x44, 0x61, 0x74, 0x61, 0x73, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x1f, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, + 0x2e, 0x47, 0x65, 0x74, 0x44, 0x61, 0x74, 0x61, 0x73, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x59, 0x0a, 0x0e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x41, 0x72, 0x74, + 0x69, 0x66, 0x61, 0x63, 0x74, 0x12, 0x22, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x63, 0x61, 0x74, 0x61, + 0x6c, 0x6f, 0x67, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, + 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x23, 0x2e, 0x64, 0x61, 0x74, 0x61, + 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x41, 0x72, + 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x50, + 0x0a, 0x0b, 0x47, 0x65, 0x74, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x12, 0x1f, 0x2e, + 0x64, 0x61, 0x74, 0x61, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x2e, 0x47, 0x65, 0x74, 0x41, + 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, + 0x2e, 0x64, 0x61, 0x74, 0x61, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x2e, 0x47, 0x65, 0x74, + 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x12, 0x41, 0x0a, 0x06, 0x41, 0x64, 0x64, 0x54, 0x61, 0x67, 0x12, 0x1a, 0x2e, 0x64, 0x61, 0x74, + 0x61, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x2e, 0x41, 0x64, 0x64, 0x54, 0x61, 0x67, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x63, 0x61, 0x74, + 0x61, 0x6c, 0x6f, 0x67, 0x2e, 0x41, 0x64, 0x64, 0x54, 0x61, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x56, 0x0a, 0x0d, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x72, 0x74, 0x69, 0x66, + 0x61, 0x63, 0x74, 0x73, 0x12, 0x21, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x63, 0x61, 0x74, 0x61, 0x6c, + 0x6f, 0x67, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x73, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x63, 0x61, + 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, + 0x63, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x53, 0x0a, 0x0c, 0x4c, + 0x69, 0x73, 0x74, 0x44, 0x61, 0x74, 0x61, 0x73, 0x65, 0x74, 0x73, 0x12, 0x20, 0x2e, 0x64, 0x61, + 0x74, 0x61, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x44, 0x61, + 0x74, 0x61, 0x73, 0x65, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, + 0x64, 0x61, 0x74, 0x61, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x2e, 0x4c, 0x69, 0x73, 0x74, + 0x44, 0x61, 0x74, 0x61, 0x73, 0x65, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x12, 0x59, 0x0a, 0x0e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, + 0x63, 0x74, 0x12, 0x22, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, + 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x23, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x63, 0x61, 0x74, + 0x61, 0x6c, 0x6f, 0x67, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x41, 0x72, 0x74, 0x69, 0x66, + 0x61, 0x63, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x59, 0x0a, 0x0e, 0x44, + 0x65, 0x6c, 0x65, 0x74, 0x65, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x12, 0x22, 0x2e, + 0x64, 0x61, 0x74, 0x61, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x2e, 0x44, 0x65, 0x6c, 0x65, + 0x74, 0x65, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x23, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x2e, + 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x71, 0x0a, 0x16, 0x47, 0x65, 0x74, 0x4f, 0x72, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x64, 0x52, 0x65, 0x73, 0x65, 0x72, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x65, 0x0a, 0x12, 0x52, 0x65, 0x6c, 0x65, - 0x61, 0x73, 0x65, 0x52, 0x65, 0x73, 0x65, 0x72, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x26, - 0x2e, 0x64, 0x61, 0x74, 0x61, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x2e, 0x52, 0x65, 0x6c, - 0x65, 0x61, 0x73, 0x65, 0x52, 0x65, 0x73, 0x65, 0x72, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x27, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x63, 0x61, 0x74, - 0x61, 0x6c, 0x6f, 0x67, 0x2e, 0x52, 0x65, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x52, 0x65, 0x73, 0x65, - 0x72, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, - 0xb2, 0x01, 0x0a, 0x0f, 0x63, 0x6f, 0x6d, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x63, 0x61, 0x74, 0x61, - 0x6c, 0x6f, 0x67, 0x42, 0x10, 0x44, 0x61, 0x74, 0x61, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, - 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x41, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, - 0x63, 0x6f, 0x6d, 0x2f, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x6f, 0x72, 0x67, 0x2f, 0x66, 0x6c, 0x79, - 0x74, 0x65, 0x2f, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2f, 0x67, 0x65, 0x6e, 0x2f, - 0x70, 0x62, 0x2d, 0x67, 0x6f, 0x2f, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2f, 0x64, - 0x61, 0x74, 0x61, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0xa2, 0x02, 0x03, 0x44, 0x58, 0x58, - 0xaa, 0x02, 0x0b, 0x44, 0x61, 0x74, 0x61, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0xca, 0x02, - 0x0b, 0x44, 0x61, 0x74, 0x61, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0xe2, 0x02, 0x17, 0x44, - 0x61, 0x74, 0x61, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, - 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0b, 0x44, 0x61, 0x74, 0x61, 0x63, 0x61, 0x74, - 0x61, 0x6c, 0x6f, 0x67, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x12, 0x2a, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x2e, 0x47, + 0x65, 0x74, 0x4f, 0x72, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x64, 0x52, 0x65, 0x73, 0x65, 0x72, 0x76, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2b, 0x2e, 0x64, + 0x61, 0x74, 0x61, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x2e, 0x47, 0x65, 0x74, 0x4f, 0x72, + 0x45, 0x78, 0x74, 0x65, 0x6e, 0x64, 0x52, 0x65, 0x73, 0x65, 0x72, 0x76, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x65, 0x0a, 0x12, 0x52, 0x65, 0x6c, + 0x65, 0x61, 0x73, 0x65, 0x52, 0x65, 0x73, 0x65, 0x72, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, + 0x26, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x2e, 0x52, 0x65, + 0x6c, 0x65, 0x61, 0x73, 0x65, 0x52, 0x65, 0x73, 0x65, 0x72, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x27, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x63, 0x61, + 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x2e, 0x52, 0x65, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x52, 0x65, 0x73, + 0x65, 0x72, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x42, 0xb2, 0x01, 0x0a, 0x0f, 0x63, 0x6f, 0x6d, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x63, 0x61, 0x74, + 0x61, 0x6c, 0x6f, 0x67, 0x42, 0x10, 0x44, 0x61, 0x74, 0x61, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, + 0x67, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x41, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, + 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x6f, 0x72, 0x67, 0x2f, 0x66, 0x6c, + 0x79, 0x74, 0x65, 0x2f, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2f, 0x67, 0x65, 0x6e, + 0x2f, 0x70, 0x62, 0x2d, 0x67, 0x6f, 0x2f, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2f, + 0x64, 0x61, 0x74, 0x61, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0xa2, 0x02, 0x03, 0x44, 0x58, + 0x58, 0xaa, 0x02, 0x0b, 0x44, 0x61, 0x74, 0x61, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0xca, + 0x02, 0x0b, 0x44, 0x61, 0x74, 0x61, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0xe2, 0x02, 0x17, + 0x44, 0x61, 0x74, 0x61, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x5c, 0x47, 0x50, 0x42, 0x4d, + 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0b, 0x44, 0x61, 0x74, 0x61, 0x63, 0x61, + 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -2900,7 +3049,7 @@ func file_flyteidl_datacatalog_datacatalog_proto_rawDescGZIP() []byte { } var file_flyteidl_datacatalog_datacatalog_proto_enumTypes = make([]protoimpl.EnumInfo, 3) -var file_flyteidl_datacatalog_datacatalog_proto_msgTypes = make([]protoimpl.MessageInfo, 38) +var file_flyteidl_datacatalog_datacatalog_proto_msgTypes = make([]protoimpl.MessageInfo, 40) var file_flyteidl_datacatalog_datacatalog_proto_goTypes = []interface{}{ (SinglePropertyFilter_ComparisonOperator)(0), // 0: datacatalog.SinglePropertyFilter.ComparisonOperator (PaginationOptions_SortOrder)(0), // 1: datacatalog.PaginationOptions.SortOrder @@ -2921,104 +3070,109 @@ var file_flyteidl_datacatalog_datacatalog_proto_goTypes = []interface{}{ (*ListDatasetsResponse)(nil), // 16: datacatalog.ListDatasetsResponse (*UpdateArtifactRequest)(nil), // 17: datacatalog.UpdateArtifactRequest (*UpdateArtifactResponse)(nil), // 18: datacatalog.UpdateArtifactResponse - (*ReservationID)(nil), // 19: datacatalog.ReservationID - (*GetOrExtendReservationRequest)(nil), // 20: datacatalog.GetOrExtendReservationRequest - (*Reservation)(nil), // 21: datacatalog.Reservation - (*GetOrExtendReservationResponse)(nil), // 22: datacatalog.GetOrExtendReservationResponse - (*ReleaseReservationRequest)(nil), // 23: datacatalog.ReleaseReservationRequest - (*ReleaseReservationResponse)(nil), // 24: datacatalog.ReleaseReservationResponse - (*Dataset)(nil), // 25: datacatalog.Dataset - (*Partition)(nil), // 26: datacatalog.Partition - (*DatasetID)(nil), // 27: datacatalog.DatasetID - (*Artifact)(nil), // 28: datacatalog.Artifact - (*ArtifactData)(nil), // 29: datacatalog.ArtifactData - (*Tag)(nil), // 30: datacatalog.Tag - (*Metadata)(nil), // 31: datacatalog.Metadata - (*FilterExpression)(nil), // 32: datacatalog.FilterExpression - (*SinglePropertyFilter)(nil), // 33: datacatalog.SinglePropertyFilter - (*ArtifactPropertyFilter)(nil), // 34: datacatalog.ArtifactPropertyFilter - (*TagPropertyFilter)(nil), // 35: datacatalog.TagPropertyFilter - (*PartitionPropertyFilter)(nil), // 36: datacatalog.PartitionPropertyFilter - (*KeyValuePair)(nil), // 37: datacatalog.KeyValuePair - (*DatasetPropertyFilter)(nil), // 38: datacatalog.DatasetPropertyFilter - (*PaginationOptions)(nil), // 39: datacatalog.PaginationOptions - nil, // 40: datacatalog.Metadata.KeyMapEntry - (*durationpb.Duration)(nil), // 41: google.protobuf.Duration - (*timestamppb.Timestamp)(nil), // 42: google.protobuf.Timestamp - (*core.Literal)(nil), // 43: flyteidl.core.Literal + (*DeleteArtifactRequest)(nil), // 19: datacatalog.DeleteArtifactRequest + (*DeleteArtifactResponse)(nil), // 20: datacatalog.DeleteArtifactResponse + (*ReservationID)(nil), // 21: datacatalog.ReservationID + (*GetOrExtendReservationRequest)(nil), // 22: datacatalog.GetOrExtendReservationRequest + (*Reservation)(nil), // 23: datacatalog.Reservation + (*GetOrExtendReservationResponse)(nil), // 24: datacatalog.GetOrExtendReservationResponse + (*ReleaseReservationRequest)(nil), // 25: datacatalog.ReleaseReservationRequest + (*ReleaseReservationResponse)(nil), // 26: datacatalog.ReleaseReservationResponse + (*Dataset)(nil), // 27: datacatalog.Dataset + (*Partition)(nil), // 28: datacatalog.Partition + (*DatasetID)(nil), // 29: datacatalog.DatasetID + (*Artifact)(nil), // 30: datacatalog.Artifact + (*ArtifactData)(nil), // 31: datacatalog.ArtifactData + (*Tag)(nil), // 32: datacatalog.Tag + (*Metadata)(nil), // 33: datacatalog.Metadata + (*FilterExpression)(nil), // 34: datacatalog.FilterExpression + (*SinglePropertyFilter)(nil), // 35: datacatalog.SinglePropertyFilter + (*ArtifactPropertyFilter)(nil), // 36: datacatalog.ArtifactPropertyFilter + (*TagPropertyFilter)(nil), // 37: datacatalog.TagPropertyFilter + (*PartitionPropertyFilter)(nil), // 38: datacatalog.PartitionPropertyFilter + (*KeyValuePair)(nil), // 39: datacatalog.KeyValuePair + (*DatasetPropertyFilter)(nil), // 40: datacatalog.DatasetPropertyFilter + (*PaginationOptions)(nil), // 41: datacatalog.PaginationOptions + nil, // 42: datacatalog.Metadata.KeyMapEntry + (*durationpb.Duration)(nil), // 43: google.protobuf.Duration + (*timestamppb.Timestamp)(nil), // 44: google.protobuf.Timestamp + (*core.Literal)(nil), // 45: flyteidl.core.Literal } var file_flyteidl_datacatalog_datacatalog_proto_depIdxs = []int32{ - 25, // 0: datacatalog.CreateDatasetRequest.dataset:type_name -> datacatalog.Dataset - 27, // 1: datacatalog.GetDatasetRequest.dataset:type_name -> datacatalog.DatasetID - 25, // 2: datacatalog.GetDatasetResponse.dataset:type_name -> datacatalog.Dataset - 27, // 3: datacatalog.GetArtifactRequest.dataset:type_name -> datacatalog.DatasetID - 28, // 4: datacatalog.GetArtifactResponse.artifact:type_name -> datacatalog.Artifact - 28, // 5: datacatalog.CreateArtifactRequest.artifact:type_name -> datacatalog.Artifact - 30, // 6: datacatalog.AddTagRequest.tag:type_name -> datacatalog.Tag - 27, // 7: datacatalog.ListArtifactsRequest.dataset:type_name -> datacatalog.DatasetID - 32, // 8: datacatalog.ListArtifactsRequest.filter:type_name -> datacatalog.FilterExpression - 39, // 9: datacatalog.ListArtifactsRequest.pagination:type_name -> datacatalog.PaginationOptions - 28, // 10: datacatalog.ListArtifactsResponse.artifacts:type_name -> datacatalog.Artifact - 32, // 11: datacatalog.ListDatasetsRequest.filter:type_name -> datacatalog.FilterExpression - 39, // 12: datacatalog.ListDatasetsRequest.pagination:type_name -> datacatalog.PaginationOptions - 25, // 13: datacatalog.ListDatasetsResponse.datasets:type_name -> datacatalog.Dataset - 27, // 14: datacatalog.UpdateArtifactRequest.dataset:type_name -> datacatalog.DatasetID - 29, // 15: datacatalog.UpdateArtifactRequest.data:type_name -> datacatalog.ArtifactData - 31, // 16: datacatalog.UpdateArtifactRequest.metadata:type_name -> datacatalog.Metadata - 27, // 17: datacatalog.ReservationID.dataset_id:type_name -> datacatalog.DatasetID - 19, // 18: datacatalog.GetOrExtendReservationRequest.reservation_id:type_name -> datacatalog.ReservationID - 41, // 19: datacatalog.GetOrExtendReservationRequest.heartbeat_interval:type_name -> google.protobuf.Duration - 19, // 20: datacatalog.Reservation.reservation_id:type_name -> datacatalog.ReservationID - 41, // 21: datacatalog.Reservation.heartbeat_interval:type_name -> google.protobuf.Duration - 42, // 22: datacatalog.Reservation.expires_at:type_name -> google.protobuf.Timestamp - 31, // 23: datacatalog.Reservation.metadata:type_name -> datacatalog.Metadata - 21, // 24: datacatalog.GetOrExtendReservationResponse.reservation:type_name -> datacatalog.Reservation - 19, // 25: datacatalog.ReleaseReservationRequest.reservation_id:type_name -> datacatalog.ReservationID - 27, // 26: datacatalog.Dataset.id:type_name -> datacatalog.DatasetID - 31, // 27: datacatalog.Dataset.metadata:type_name -> datacatalog.Metadata - 27, // 28: datacatalog.Artifact.dataset:type_name -> datacatalog.DatasetID - 29, // 29: datacatalog.Artifact.data:type_name -> datacatalog.ArtifactData - 31, // 30: datacatalog.Artifact.metadata:type_name -> datacatalog.Metadata - 26, // 31: datacatalog.Artifact.partitions:type_name -> datacatalog.Partition - 30, // 32: datacatalog.Artifact.tags:type_name -> datacatalog.Tag - 42, // 33: datacatalog.Artifact.created_at:type_name -> google.protobuf.Timestamp - 43, // 34: datacatalog.ArtifactData.value:type_name -> flyteidl.core.Literal - 27, // 35: datacatalog.Tag.dataset:type_name -> datacatalog.DatasetID - 40, // 36: datacatalog.Metadata.key_map:type_name -> datacatalog.Metadata.KeyMapEntry - 33, // 37: datacatalog.FilterExpression.filters:type_name -> datacatalog.SinglePropertyFilter - 35, // 38: datacatalog.SinglePropertyFilter.tag_filter:type_name -> datacatalog.TagPropertyFilter - 36, // 39: datacatalog.SinglePropertyFilter.partition_filter:type_name -> datacatalog.PartitionPropertyFilter - 34, // 40: datacatalog.SinglePropertyFilter.artifact_filter:type_name -> datacatalog.ArtifactPropertyFilter - 38, // 41: datacatalog.SinglePropertyFilter.dataset_filter:type_name -> datacatalog.DatasetPropertyFilter - 0, // 42: datacatalog.SinglePropertyFilter.operator:type_name -> datacatalog.SinglePropertyFilter.ComparisonOperator - 37, // 43: datacatalog.PartitionPropertyFilter.key_val:type_name -> datacatalog.KeyValuePair - 2, // 44: datacatalog.PaginationOptions.sortKey:type_name -> datacatalog.PaginationOptions.SortKey - 1, // 45: datacatalog.PaginationOptions.sortOrder:type_name -> datacatalog.PaginationOptions.SortOrder - 3, // 46: datacatalog.DataCatalog.CreateDataset:input_type -> datacatalog.CreateDatasetRequest - 5, // 47: datacatalog.DataCatalog.GetDataset:input_type -> datacatalog.GetDatasetRequest - 9, // 48: datacatalog.DataCatalog.CreateArtifact:input_type -> datacatalog.CreateArtifactRequest - 7, // 49: datacatalog.DataCatalog.GetArtifact:input_type -> datacatalog.GetArtifactRequest - 11, // 50: datacatalog.DataCatalog.AddTag:input_type -> datacatalog.AddTagRequest - 13, // 51: datacatalog.DataCatalog.ListArtifacts:input_type -> datacatalog.ListArtifactsRequest - 15, // 52: datacatalog.DataCatalog.ListDatasets:input_type -> datacatalog.ListDatasetsRequest - 17, // 53: datacatalog.DataCatalog.UpdateArtifact:input_type -> datacatalog.UpdateArtifactRequest - 20, // 54: datacatalog.DataCatalog.GetOrExtendReservation:input_type -> datacatalog.GetOrExtendReservationRequest - 23, // 55: datacatalog.DataCatalog.ReleaseReservation:input_type -> datacatalog.ReleaseReservationRequest - 4, // 56: datacatalog.DataCatalog.CreateDataset:output_type -> datacatalog.CreateDatasetResponse - 6, // 57: datacatalog.DataCatalog.GetDataset:output_type -> datacatalog.GetDatasetResponse - 10, // 58: datacatalog.DataCatalog.CreateArtifact:output_type -> datacatalog.CreateArtifactResponse - 8, // 59: datacatalog.DataCatalog.GetArtifact:output_type -> datacatalog.GetArtifactResponse - 12, // 60: datacatalog.DataCatalog.AddTag:output_type -> datacatalog.AddTagResponse - 14, // 61: datacatalog.DataCatalog.ListArtifacts:output_type -> datacatalog.ListArtifactsResponse - 16, // 62: datacatalog.DataCatalog.ListDatasets:output_type -> datacatalog.ListDatasetsResponse - 18, // 63: datacatalog.DataCatalog.UpdateArtifact:output_type -> datacatalog.UpdateArtifactResponse - 22, // 64: datacatalog.DataCatalog.GetOrExtendReservation:output_type -> datacatalog.GetOrExtendReservationResponse - 24, // 65: datacatalog.DataCatalog.ReleaseReservation:output_type -> datacatalog.ReleaseReservationResponse - 56, // [56:66] is the sub-list for method output_type - 46, // [46:56] is the sub-list for method input_type - 46, // [46:46] is the sub-list for extension type_name - 46, // [46:46] is the sub-list for extension extendee - 0, // [0:46] is the sub-list for field type_name + 27, // 0: datacatalog.CreateDatasetRequest.dataset:type_name -> datacatalog.Dataset + 29, // 1: datacatalog.GetDatasetRequest.dataset:type_name -> datacatalog.DatasetID + 27, // 2: datacatalog.GetDatasetResponse.dataset:type_name -> datacatalog.Dataset + 29, // 3: datacatalog.GetArtifactRequest.dataset:type_name -> datacatalog.DatasetID + 30, // 4: datacatalog.GetArtifactResponse.artifact:type_name -> datacatalog.Artifact + 30, // 5: datacatalog.CreateArtifactRequest.artifact:type_name -> datacatalog.Artifact + 32, // 6: datacatalog.AddTagRequest.tag:type_name -> datacatalog.Tag + 29, // 7: datacatalog.ListArtifactsRequest.dataset:type_name -> datacatalog.DatasetID + 34, // 8: datacatalog.ListArtifactsRequest.filter:type_name -> datacatalog.FilterExpression + 41, // 9: datacatalog.ListArtifactsRequest.pagination:type_name -> datacatalog.PaginationOptions + 30, // 10: datacatalog.ListArtifactsResponse.artifacts:type_name -> datacatalog.Artifact + 34, // 11: datacatalog.ListDatasetsRequest.filter:type_name -> datacatalog.FilterExpression + 41, // 12: datacatalog.ListDatasetsRequest.pagination:type_name -> datacatalog.PaginationOptions + 27, // 13: datacatalog.ListDatasetsResponse.datasets:type_name -> datacatalog.Dataset + 29, // 14: datacatalog.UpdateArtifactRequest.dataset:type_name -> datacatalog.DatasetID + 31, // 15: datacatalog.UpdateArtifactRequest.data:type_name -> datacatalog.ArtifactData + 33, // 16: datacatalog.UpdateArtifactRequest.metadata:type_name -> datacatalog.Metadata + 29, // 17: datacatalog.DeleteArtifactRequest.dataset:type_name -> datacatalog.DatasetID + 29, // 18: datacatalog.ReservationID.dataset_id:type_name -> datacatalog.DatasetID + 21, // 19: datacatalog.GetOrExtendReservationRequest.reservation_id:type_name -> datacatalog.ReservationID + 43, // 20: datacatalog.GetOrExtendReservationRequest.heartbeat_interval:type_name -> google.protobuf.Duration + 21, // 21: datacatalog.Reservation.reservation_id:type_name -> datacatalog.ReservationID + 43, // 22: datacatalog.Reservation.heartbeat_interval:type_name -> google.protobuf.Duration + 44, // 23: datacatalog.Reservation.expires_at:type_name -> google.protobuf.Timestamp + 33, // 24: datacatalog.Reservation.metadata:type_name -> datacatalog.Metadata + 23, // 25: datacatalog.GetOrExtendReservationResponse.reservation:type_name -> datacatalog.Reservation + 21, // 26: datacatalog.ReleaseReservationRequest.reservation_id:type_name -> datacatalog.ReservationID + 29, // 27: datacatalog.Dataset.id:type_name -> datacatalog.DatasetID + 33, // 28: datacatalog.Dataset.metadata:type_name -> datacatalog.Metadata + 29, // 29: datacatalog.Artifact.dataset:type_name -> datacatalog.DatasetID + 31, // 30: datacatalog.Artifact.data:type_name -> datacatalog.ArtifactData + 33, // 31: datacatalog.Artifact.metadata:type_name -> datacatalog.Metadata + 28, // 32: datacatalog.Artifact.partitions:type_name -> datacatalog.Partition + 32, // 33: datacatalog.Artifact.tags:type_name -> datacatalog.Tag + 44, // 34: datacatalog.Artifact.created_at:type_name -> google.protobuf.Timestamp + 45, // 35: datacatalog.ArtifactData.value:type_name -> flyteidl.core.Literal + 29, // 36: datacatalog.Tag.dataset:type_name -> datacatalog.DatasetID + 42, // 37: datacatalog.Metadata.key_map:type_name -> datacatalog.Metadata.KeyMapEntry + 35, // 38: datacatalog.FilterExpression.filters:type_name -> datacatalog.SinglePropertyFilter + 37, // 39: datacatalog.SinglePropertyFilter.tag_filter:type_name -> datacatalog.TagPropertyFilter + 38, // 40: datacatalog.SinglePropertyFilter.partition_filter:type_name -> datacatalog.PartitionPropertyFilter + 36, // 41: datacatalog.SinglePropertyFilter.artifact_filter:type_name -> datacatalog.ArtifactPropertyFilter + 40, // 42: datacatalog.SinglePropertyFilter.dataset_filter:type_name -> datacatalog.DatasetPropertyFilter + 0, // 43: datacatalog.SinglePropertyFilter.operator:type_name -> datacatalog.SinglePropertyFilter.ComparisonOperator + 39, // 44: datacatalog.PartitionPropertyFilter.key_val:type_name -> datacatalog.KeyValuePair + 2, // 45: datacatalog.PaginationOptions.sortKey:type_name -> datacatalog.PaginationOptions.SortKey + 1, // 46: datacatalog.PaginationOptions.sortOrder:type_name -> datacatalog.PaginationOptions.SortOrder + 3, // 47: datacatalog.DataCatalog.CreateDataset:input_type -> datacatalog.CreateDatasetRequest + 5, // 48: datacatalog.DataCatalog.GetDataset:input_type -> datacatalog.GetDatasetRequest + 9, // 49: datacatalog.DataCatalog.CreateArtifact:input_type -> datacatalog.CreateArtifactRequest + 7, // 50: datacatalog.DataCatalog.GetArtifact:input_type -> datacatalog.GetArtifactRequest + 11, // 51: datacatalog.DataCatalog.AddTag:input_type -> datacatalog.AddTagRequest + 13, // 52: datacatalog.DataCatalog.ListArtifacts:input_type -> datacatalog.ListArtifactsRequest + 15, // 53: datacatalog.DataCatalog.ListDatasets:input_type -> datacatalog.ListDatasetsRequest + 17, // 54: datacatalog.DataCatalog.UpdateArtifact:input_type -> datacatalog.UpdateArtifactRequest + 19, // 55: datacatalog.DataCatalog.DeleteArtifact:input_type -> datacatalog.DeleteArtifactRequest + 22, // 56: datacatalog.DataCatalog.GetOrExtendReservation:input_type -> datacatalog.GetOrExtendReservationRequest + 25, // 57: datacatalog.DataCatalog.ReleaseReservation:input_type -> datacatalog.ReleaseReservationRequest + 4, // 58: datacatalog.DataCatalog.CreateDataset:output_type -> datacatalog.CreateDatasetResponse + 6, // 59: datacatalog.DataCatalog.GetDataset:output_type -> datacatalog.GetDatasetResponse + 10, // 60: datacatalog.DataCatalog.CreateArtifact:output_type -> datacatalog.CreateArtifactResponse + 8, // 61: datacatalog.DataCatalog.GetArtifact:output_type -> datacatalog.GetArtifactResponse + 12, // 62: datacatalog.DataCatalog.AddTag:output_type -> datacatalog.AddTagResponse + 14, // 63: datacatalog.DataCatalog.ListArtifacts:output_type -> datacatalog.ListArtifactsResponse + 16, // 64: datacatalog.DataCatalog.ListDatasets:output_type -> datacatalog.ListDatasetsResponse + 18, // 65: datacatalog.DataCatalog.UpdateArtifact:output_type -> datacatalog.UpdateArtifactResponse + 20, // 66: datacatalog.DataCatalog.DeleteArtifact:output_type -> datacatalog.DeleteArtifactResponse + 24, // 67: datacatalog.DataCatalog.GetOrExtendReservation:output_type -> datacatalog.GetOrExtendReservationResponse + 26, // 68: datacatalog.DataCatalog.ReleaseReservation:output_type -> datacatalog.ReleaseReservationResponse + 58, // [58:69] is the sub-list for method output_type + 47, // [47:58] is the sub-list for method input_type + 47, // [47:47] is the sub-list for extension type_name + 47, // [47:47] is the sub-list for extension extendee + 0, // [0:47] is the sub-list for field type_name } func init() { file_flyteidl_datacatalog_datacatalog_proto_init() } @@ -3220,7 +3374,7 @@ func file_flyteidl_datacatalog_datacatalog_proto_init() { } } file_flyteidl_datacatalog_datacatalog_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ReservationID); i { + switch v := v.(*DeleteArtifactRequest); i { case 0: return &v.state case 1: @@ -3232,7 +3386,7 @@ func file_flyteidl_datacatalog_datacatalog_proto_init() { } } file_flyteidl_datacatalog_datacatalog_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetOrExtendReservationRequest); i { + switch v := v.(*DeleteArtifactResponse); i { case 0: return &v.state case 1: @@ -3244,7 +3398,7 @@ func file_flyteidl_datacatalog_datacatalog_proto_init() { } } file_flyteidl_datacatalog_datacatalog_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Reservation); i { + switch v := v.(*ReservationID); i { case 0: return &v.state case 1: @@ -3256,7 +3410,7 @@ func file_flyteidl_datacatalog_datacatalog_proto_init() { } } file_flyteidl_datacatalog_datacatalog_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetOrExtendReservationResponse); i { + switch v := v.(*GetOrExtendReservationRequest); i { case 0: return &v.state case 1: @@ -3268,7 +3422,7 @@ func file_flyteidl_datacatalog_datacatalog_proto_init() { } } file_flyteidl_datacatalog_datacatalog_proto_msgTypes[20].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ReleaseReservationRequest); i { + switch v := v.(*Reservation); i { case 0: return &v.state case 1: @@ -3280,7 +3434,7 @@ func file_flyteidl_datacatalog_datacatalog_proto_init() { } } file_flyteidl_datacatalog_datacatalog_proto_msgTypes[21].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ReleaseReservationResponse); i { + switch v := v.(*GetOrExtendReservationResponse); i { case 0: return &v.state case 1: @@ -3292,7 +3446,7 @@ func file_flyteidl_datacatalog_datacatalog_proto_init() { } } file_flyteidl_datacatalog_datacatalog_proto_msgTypes[22].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Dataset); i { + switch v := v.(*ReleaseReservationRequest); i { case 0: return &v.state case 1: @@ -3304,7 +3458,7 @@ func file_flyteidl_datacatalog_datacatalog_proto_init() { } } file_flyteidl_datacatalog_datacatalog_proto_msgTypes[23].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Partition); i { + switch v := v.(*ReleaseReservationResponse); i { case 0: return &v.state case 1: @@ -3316,7 +3470,7 @@ func file_flyteidl_datacatalog_datacatalog_proto_init() { } } file_flyteidl_datacatalog_datacatalog_proto_msgTypes[24].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DatasetID); i { + switch v := v.(*Dataset); i { case 0: return &v.state case 1: @@ -3328,7 +3482,7 @@ func file_flyteidl_datacatalog_datacatalog_proto_init() { } } file_flyteidl_datacatalog_datacatalog_proto_msgTypes[25].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Artifact); i { + switch v := v.(*Partition); i { case 0: return &v.state case 1: @@ -3340,7 +3494,7 @@ func file_flyteidl_datacatalog_datacatalog_proto_init() { } } file_flyteidl_datacatalog_datacatalog_proto_msgTypes[26].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ArtifactData); i { + switch v := v.(*DatasetID); i { case 0: return &v.state case 1: @@ -3352,7 +3506,7 @@ func file_flyteidl_datacatalog_datacatalog_proto_init() { } } file_flyteidl_datacatalog_datacatalog_proto_msgTypes[27].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Tag); i { + switch v := v.(*Artifact); i { case 0: return &v.state case 1: @@ -3364,7 +3518,7 @@ func file_flyteidl_datacatalog_datacatalog_proto_init() { } } file_flyteidl_datacatalog_datacatalog_proto_msgTypes[28].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Metadata); i { + switch v := v.(*ArtifactData); i { case 0: return &v.state case 1: @@ -3376,7 +3530,7 @@ func file_flyteidl_datacatalog_datacatalog_proto_init() { } } file_flyteidl_datacatalog_datacatalog_proto_msgTypes[29].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*FilterExpression); i { + switch v := v.(*Tag); i { case 0: return &v.state case 1: @@ -3388,7 +3542,7 @@ func file_flyteidl_datacatalog_datacatalog_proto_init() { } } file_flyteidl_datacatalog_datacatalog_proto_msgTypes[30].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SinglePropertyFilter); i { + switch v := v.(*Metadata); i { case 0: return &v.state case 1: @@ -3400,7 +3554,7 @@ func file_flyteidl_datacatalog_datacatalog_proto_init() { } } file_flyteidl_datacatalog_datacatalog_proto_msgTypes[31].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ArtifactPropertyFilter); i { + switch v := v.(*FilterExpression); i { case 0: return &v.state case 1: @@ -3412,7 +3566,7 @@ func file_flyteidl_datacatalog_datacatalog_proto_init() { } } file_flyteidl_datacatalog_datacatalog_proto_msgTypes[32].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*TagPropertyFilter); i { + switch v := v.(*SinglePropertyFilter); i { case 0: return &v.state case 1: @@ -3424,7 +3578,7 @@ func file_flyteidl_datacatalog_datacatalog_proto_init() { } } file_flyteidl_datacatalog_datacatalog_proto_msgTypes[33].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PartitionPropertyFilter); i { + switch v := v.(*ArtifactPropertyFilter); i { case 0: return &v.state case 1: @@ -3436,7 +3590,7 @@ func file_flyteidl_datacatalog_datacatalog_proto_init() { } } file_flyteidl_datacatalog_datacatalog_proto_msgTypes[34].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*KeyValuePair); i { + switch v := v.(*TagPropertyFilter); i { case 0: return &v.state case 1: @@ -3448,7 +3602,7 @@ func file_flyteidl_datacatalog_datacatalog_proto_init() { } } file_flyteidl_datacatalog_datacatalog_proto_msgTypes[35].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DatasetPropertyFilter); i { + switch v := v.(*PartitionPropertyFilter); i { case 0: return &v.state case 1: @@ -3460,6 +3614,30 @@ func file_flyteidl_datacatalog_datacatalog_proto_init() { } } file_flyteidl_datacatalog_datacatalog_proto_msgTypes[36].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*KeyValuePair); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_flyteidl_datacatalog_datacatalog_proto_msgTypes[37].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DatasetPropertyFilter); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_flyteidl_datacatalog_datacatalog_proto_msgTypes[38].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PaginationOptions); i { case 0: return &v.state @@ -3480,22 +3658,26 @@ func file_flyteidl_datacatalog_datacatalog_proto_init() { (*UpdateArtifactRequest_ArtifactId)(nil), (*UpdateArtifactRequest_TagName)(nil), } - file_flyteidl_datacatalog_datacatalog_proto_msgTypes[30].OneofWrappers = []interface{}{ + file_flyteidl_datacatalog_datacatalog_proto_msgTypes[16].OneofWrappers = []interface{}{ + (*DeleteArtifactRequest_ArtifactId)(nil), + (*DeleteArtifactRequest_TagName)(nil), + } + file_flyteidl_datacatalog_datacatalog_proto_msgTypes[32].OneofWrappers = []interface{}{ (*SinglePropertyFilter_TagFilter)(nil), (*SinglePropertyFilter_PartitionFilter)(nil), (*SinglePropertyFilter_ArtifactFilter)(nil), (*SinglePropertyFilter_DatasetFilter)(nil), } - file_flyteidl_datacatalog_datacatalog_proto_msgTypes[31].OneofWrappers = []interface{}{ + file_flyteidl_datacatalog_datacatalog_proto_msgTypes[33].OneofWrappers = []interface{}{ (*ArtifactPropertyFilter_ArtifactId)(nil), } - file_flyteidl_datacatalog_datacatalog_proto_msgTypes[32].OneofWrappers = []interface{}{ + file_flyteidl_datacatalog_datacatalog_proto_msgTypes[34].OneofWrappers = []interface{}{ (*TagPropertyFilter_TagName)(nil), } - file_flyteidl_datacatalog_datacatalog_proto_msgTypes[33].OneofWrappers = []interface{}{ + file_flyteidl_datacatalog_datacatalog_proto_msgTypes[35].OneofWrappers = []interface{}{ (*PartitionPropertyFilter_KeyVal)(nil), } - file_flyteidl_datacatalog_datacatalog_proto_msgTypes[35].OneofWrappers = []interface{}{ + file_flyteidl_datacatalog_datacatalog_proto_msgTypes[37].OneofWrappers = []interface{}{ (*DatasetPropertyFilter_Project)(nil), (*DatasetPropertyFilter_Name)(nil), (*DatasetPropertyFilter_Domain)(nil), @@ -3508,7 +3690,7 @@ func file_flyteidl_datacatalog_datacatalog_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_flyteidl_datacatalog_datacatalog_proto_rawDesc, NumEnums: 3, - NumMessages: 38, + NumMessages: 40, NumExtensions: 0, NumServices: 1, }, diff --git a/flyteidl/gen/pb-go/flyteidl/datacatalog/datacatalog_grpc.pb.go b/flyteidl/gen/pb-go/flyteidl/datacatalog/datacatalog_grpc.pb.go index 41628d16e3..d0cf6d3791 100644 --- a/flyteidl/gen/pb-go/flyteidl/datacatalog/datacatalog_grpc.pb.go +++ b/flyteidl/gen/pb-go/flyteidl/datacatalog/datacatalog_grpc.pb.go @@ -27,6 +27,7 @@ const ( DataCatalog_ListArtifacts_FullMethodName = "/datacatalog.DataCatalog/ListArtifacts" DataCatalog_ListDatasets_FullMethodName = "/datacatalog.DataCatalog/ListDatasets" DataCatalog_UpdateArtifact_FullMethodName = "/datacatalog.DataCatalog/UpdateArtifact" + DataCatalog_DeleteArtifact_FullMethodName = "/datacatalog.DataCatalog/DeleteArtifact" DataCatalog_GetOrExtendReservation_FullMethodName = "/datacatalog.DataCatalog/GetOrExtendReservation" DataCatalog_ReleaseReservation_FullMethodName = "/datacatalog.DataCatalog/ReleaseReservation" ) @@ -53,6 +54,8 @@ type DataCatalogClient interface { ListDatasets(ctx context.Context, in *ListDatasetsRequest, opts ...grpc.CallOption) (*ListDatasetsResponse, error) // Updates an existing artifact, overwriting the stored artifact data in the underlying blob storage. UpdateArtifact(ctx context.Context, in *UpdateArtifactRequest, opts ...grpc.CallOption) (*UpdateArtifactResponse, error) + // Deletes an existing artifact, removing the stored artifact data from the underlying blob storage. + DeleteArtifact(ctx context.Context, in *DeleteArtifactRequest, opts ...grpc.CallOption) (*DeleteArtifactResponse, error) // Attempts to get or extend a reservation for the corresponding artifact. If one already exists // (ie. another entity owns the reservation) then that reservation is retrieved. // Once you acquire a reservation, you need to periodically extend the reservation with an @@ -150,6 +153,15 @@ func (c *dataCatalogClient) UpdateArtifact(ctx context.Context, in *UpdateArtifa return out, nil } +func (c *dataCatalogClient) DeleteArtifact(ctx context.Context, in *DeleteArtifactRequest, opts ...grpc.CallOption) (*DeleteArtifactResponse, error) { + out := new(DeleteArtifactResponse) + err := c.cc.Invoke(ctx, DataCatalog_DeleteArtifact_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + func (c *dataCatalogClient) GetOrExtendReservation(ctx context.Context, in *GetOrExtendReservationRequest, opts ...grpc.CallOption) (*GetOrExtendReservationResponse, error) { out := new(GetOrExtendReservationResponse) err := c.cc.Invoke(ctx, DataCatalog_GetOrExtendReservation_FullMethodName, in, out, opts...) @@ -190,6 +202,8 @@ type DataCatalogServer interface { ListDatasets(context.Context, *ListDatasetsRequest) (*ListDatasetsResponse, error) // Updates an existing artifact, overwriting the stored artifact data in the underlying blob storage. UpdateArtifact(context.Context, *UpdateArtifactRequest) (*UpdateArtifactResponse, error) + // Deletes an existing artifact, removing the stored artifact data from the underlying blob storage. + DeleteArtifact(context.Context, *DeleteArtifactRequest) (*DeleteArtifactResponse, error) // Attempts to get or extend a reservation for the corresponding artifact. If one already exists // (ie. another entity owns the reservation) then that reservation is retrieved. // Once you acquire a reservation, you need to periodically extend the reservation with an @@ -235,6 +249,9 @@ func (UnimplementedDataCatalogServer) ListDatasets(context.Context, *ListDataset func (UnimplementedDataCatalogServer) UpdateArtifact(context.Context, *UpdateArtifactRequest) (*UpdateArtifactResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method UpdateArtifact not implemented") } +func (UnimplementedDataCatalogServer) DeleteArtifact(context.Context, *DeleteArtifactRequest) (*DeleteArtifactResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method DeleteArtifact not implemented") +} func (UnimplementedDataCatalogServer) GetOrExtendReservation(context.Context, *GetOrExtendReservationRequest) (*GetOrExtendReservationResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method GetOrExtendReservation not implemented") } @@ -397,6 +414,24 @@ func _DataCatalog_UpdateArtifact_Handler(srv interface{}, ctx context.Context, d return interceptor(ctx, in, info, handler) } +func _DataCatalog_DeleteArtifact_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(DeleteArtifactRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(DataCatalogServer).DeleteArtifact(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: DataCatalog_DeleteArtifact_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(DataCatalogServer).DeleteArtifact(ctx, req.(*DeleteArtifactRequest)) + } + return interceptor(ctx, in, info, handler) +} + func _DataCatalog_GetOrExtendReservation_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(GetOrExtendReservationRequest) if err := dec(in); err != nil { @@ -472,6 +507,10 @@ var DataCatalog_ServiceDesc = grpc.ServiceDesc{ MethodName: "UpdateArtifact", Handler: _DataCatalog_UpdateArtifact_Handler, }, + { + MethodName: "DeleteArtifact", + Handler: _DataCatalog_DeleteArtifact_Handler, + }, { MethodName: "GetOrExtendReservation", Handler: _DataCatalog_GetOrExtendReservation_Handler, diff --git a/flyteidl/gen/pb-go/flyteidl/service/cache.pb.go b/flyteidl/gen/pb-go/flyteidl/service/cache.pb.go new file mode 100644 index 0000000000..a6218b7b2b --- /dev/null +++ b/flyteidl/gen/pb-go/flyteidl/service/cache.pb.go @@ -0,0 +1,276 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.30.0 +// protoc (unknown) +// source: flyteidl/service/cache.proto + +package service + +import ( + core "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/core" + _ "google.golang.org/genproto/googleapis/api/annotations" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type EvictTaskExecutionCacheRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Identifier of :ref:`ref_flyteidl.admin.TaskExecution` to evict cache for. + TaskExecutionId *core.TaskExecutionIdentifier `protobuf:"bytes,1,opt,name=task_execution_id,json=taskExecutionId,proto3" json:"task_execution_id,omitempty"` +} + +func (x *EvictTaskExecutionCacheRequest) Reset() { + *x = EvictTaskExecutionCacheRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_flyteidl_service_cache_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *EvictTaskExecutionCacheRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*EvictTaskExecutionCacheRequest) ProtoMessage() {} + +func (x *EvictTaskExecutionCacheRequest) ProtoReflect() protoreflect.Message { + mi := &file_flyteidl_service_cache_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use EvictTaskExecutionCacheRequest.ProtoReflect.Descriptor instead. +func (*EvictTaskExecutionCacheRequest) Descriptor() ([]byte, []int) { + return file_flyteidl_service_cache_proto_rawDescGZIP(), []int{0} +} + +func (x *EvictTaskExecutionCacheRequest) GetTaskExecutionId() *core.TaskExecutionIdentifier { + if x != nil { + return x.TaskExecutionId + } + return nil +} + +type EvictCacheResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // List of errors encountered during cache eviction (if any). + Errors *core.CacheEvictionErrorList `protobuf:"bytes,1,opt,name=errors,proto3" json:"errors,omitempty"` +} + +func (x *EvictCacheResponse) Reset() { + *x = EvictCacheResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_flyteidl_service_cache_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *EvictCacheResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*EvictCacheResponse) ProtoMessage() {} + +func (x *EvictCacheResponse) ProtoReflect() protoreflect.Message { + mi := &file_flyteidl_service_cache_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use EvictCacheResponse.ProtoReflect.Descriptor instead. +func (*EvictCacheResponse) Descriptor() ([]byte, []int) { + return file_flyteidl_service_cache_proto_rawDescGZIP(), []int{1} +} + +func (x *EvictCacheResponse) GetErrors() *core.CacheEvictionErrorList { + if x != nil { + return x.Errors + } + return nil +} + +var File_flyteidl_service_cache_proto protoreflect.FileDescriptor + +var file_flyteidl_service_cache_proto_rawDesc = []byte{ + 0x0a, 0x1c, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, + 0x63, 0x65, 0x2f, 0x63, 0x61, 0x63, 0x68, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x10, + 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, + 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, + 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1a, + 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x65, 0x72, + 0x72, 0x6f, 0x72, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x66, 0x6c, 0x79, 0x74, + 0x65, 0x69, 0x64, 0x6c, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, + 0x66, 0x69, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x74, 0x0a, 0x1e, 0x45, 0x76, + 0x69, 0x63, 0x74, 0x54, 0x61, 0x73, 0x6b, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, + 0x43, 0x61, 0x63, 0x68, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x52, 0x0a, 0x11, + 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, + 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, + 0x64, 0x6c, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x45, 0x78, 0x65, 0x63, + 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x52, + 0x0f, 0x74, 0x61, 0x73, 0x6b, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, + 0x22, 0x53, 0x0a, 0x12, 0x45, 0x76, 0x69, 0x63, 0x74, 0x43, 0x61, 0x63, 0x68, 0x65, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3d, 0x0a, 0x06, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x73, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, + 0x6c, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x43, 0x61, 0x63, 0x68, 0x65, 0x45, 0x76, 0x69, 0x63, + 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x06, 0x65, + 0x72, 0x72, 0x6f, 0x72, 0x73, 0x32, 0xb5, 0x04, 0x0a, 0x0c, 0x43, 0x61, 0x63, 0x68, 0x65, 0x53, + 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0xa4, 0x04, 0x0a, 0x17, 0x45, 0x76, 0x69, 0x63, 0x74, + 0x54, 0x61, 0x73, 0x6b, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x61, 0x63, + 0x68, 0x65, 0x12, 0x30, 0x2e, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2e, 0x73, 0x65, + 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x76, 0x69, 0x63, 0x74, 0x54, 0x61, 0x73, 0x6b, 0x45, + 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x61, 0x63, 0x68, 0x65, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, 0x2e, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2e, + 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x76, 0x69, 0x63, 0x74, 0x43, 0x61, 0x63, + 0x68, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xb0, 0x03, 0x82, 0xd3, 0xe4, + 0x93, 0x02, 0xa9, 0x03, 0x2a, 0xa6, 0x03, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x63, + 0x61, 0x63, 0x68, 0x65, 0x2f, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x7b, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x65, 0x78, 0x65, 0x63, 0x75, + 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x2e, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x65, 0x78, 0x65, + 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x2e, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, + 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x2e, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x7d, 0x2f, + 0x7b, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x5f, + 0x69, 0x64, 0x2e, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, + 0x6e, 0x5f, 0x69, 0x64, 0x2e, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, + 0x64, 0x2e, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x7d, 0x2f, 0x7b, 0x74, 0x61, 0x73, 0x6b, 0x5f, + 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x2e, 0x6e, 0x6f, 0x64, + 0x65, 0x5f, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x2e, 0x65, + 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x2e, 0x6e, 0x61, 0x6d, 0x65, + 0x7d, 0x2f, 0x7b, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, + 0x6e, 0x5f, 0x69, 0x64, 0x2e, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, + 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x2e, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x69, 0x64, 0x7d, 0x2f, + 0x7b, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x5f, + 0x69, 0x64, 0x2e, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x69, 0x64, 0x2e, 0x70, 0x72, 0x6f, 0x6a, 0x65, + 0x63, 0x74, 0x7d, 0x2f, 0x7b, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, + 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x2e, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x69, 0x64, 0x2e, 0x64, + 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x7d, 0x2f, 0x7b, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x65, 0x78, 0x65, + 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x2e, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x69, + 0x64, 0x2e, 0x6e, 0x61, 0x6d, 0x65, 0x7d, 0x2f, 0x7b, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x65, 0x78, + 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x2e, 0x74, 0x61, 0x73, 0x6b, 0x5f, + 0x69, 0x64, 0x2e, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x7d, 0x2f, 0x7b, 0x74, 0x61, 0x73, + 0x6b, 0x5f, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x2e, 0x72, + 0x65, 0x74, 0x72, 0x79, 0x5f, 0x61, 0x74, 0x74, 0x65, 0x6d, 0x70, 0x74, 0x7d, 0x42, 0xc2, 0x01, + 0x0a, 0x14, 0x63, 0x6f, 0x6d, 0x2e, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2e, 0x73, + 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x42, 0x0a, 0x43, 0x61, 0x63, 0x68, 0x65, 0x50, 0x72, 0x6f, + 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x3d, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, + 0x2f, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x6f, 0x72, 0x67, 0x2f, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x2f, + 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2f, 0x67, 0x65, 0x6e, 0x2f, 0x70, 0x62, 0x2d, + 0x67, 0x6f, 0x2f, 0x66, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x2f, 0x73, 0x65, 0x72, 0x76, + 0x69, 0x63, 0x65, 0xa2, 0x02, 0x03, 0x46, 0x53, 0x58, 0xaa, 0x02, 0x10, 0x46, 0x6c, 0x79, 0x74, + 0x65, 0x69, 0x64, 0x6c, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0xca, 0x02, 0x10, 0x46, + 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x5c, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0xe2, + 0x02, 0x1c, 0x46, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x5c, 0x53, 0x65, 0x72, 0x76, 0x69, + 0x63, 0x65, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, + 0x11, 0x46, 0x6c, 0x79, 0x74, 0x65, 0x69, 0x64, 0x6c, 0x3a, 0x3a, 0x53, 0x65, 0x72, 0x76, 0x69, + 0x63, 0x65, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_flyteidl_service_cache_proto_rawDescOnce sync.Once + file_flyteidl_service_cache_proto_rawDescData = file_flyteidl_service_cache_proto_rawDesc +) + +func file_flyteidl_service_cache_proto_rawDescGZIP() []byte { + file_flyteidl_service_cache_proto_rawDescOnce.Do(func() { + file_flyteidl_service_cache_proto_rawDescData = protoimpl.X.CompressGZIP(file_flyteidl_service_cache_proto_rawDescData) + }) + return file_flyteidl_service_cache_proto_rawDescData +} + +var file_flyteidl_service_cache_proto_msgTypes = make([]protoimpl.MessageInfo, 2) +var file_flyteidl_service_cache_proto_goTypes = []interface{}{ + (*EvictTaskExecutionCacheRequest)(nil), // 0: flyteidl.service.EvictTaskExecutionCacheRequest + (*EvictCacheResponse)(nil), // 1: flyteidl.service.EvictCacheResponse + (*core.TaskExecutionIdentifier)(nil), // 2: flyteidl.core.TaskExecutionIdentifier + (*core.CacheEvictionErrorList)(nil), // 3: flyteidl.core.CacheEvictionErrorList +} +var file_flyteidl_service_cache_proto_depIdxs = []int32{ + 2, // 0: flyteidl.service.EvictTaskExecutionCacheRequest.task_execution_id:type_name -> flyteidl.core.TaskExecutionIdentifier + 3, // 1: flyteidl.service.EvictCacheResponse.errors:type_name -> flyteidl.core.CacheEvictionErrorList + 0, // 2: flyteidl.service.CacheService.EvictTaskExecutionCache:input_type -> flyteidl.service.EvictTaskExecutionCacheRequest + 1, // 3: flyteidl.service.CacheService.EvictTaskExecutionCache:output_type -> flyteidl.service.EvictCacheResponse + 3, // [3:4] is the sub-list for method output_type + 2, // [2:3] is the sub-list for method input_type + 2, // [2:2] is the sub-list for extension type_name + 2, // [2:2] is the sub-list for extension extendee + 0, // [0:2] is the sub-list for field type_name +} + +func init() { file_flyteidl_service_cache_proto_init() } +func file_flyteidl_service_cache_proto_init() { + if File_flyteidl_service_cache_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_flyteidl_service_cache_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*EvictTaskExecutionCacheRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_flyteidl_service_cache_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*EvictCacheResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_flyteidl_service_cache_proto_rawDesc, + NumEnums: 0, + NumMessages: 2, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_flyteidl_service_cache_proto_goTypes, + DependencyIndexes: file_flyteidl_service_cache_proto_depIdxs, + MessageInfos: file_flyteidl_service_cache_proto_msgTypes, + }.Build() + File_flyteidl_service_cache_proto = out.File + file_flyteidl_service_cache_proto_rawDesc = nil + file_flyteidl_service_cache_proto_goTypes = nil + file_flyteidl_service_cache_proto_depIdxs = nil +} diff --git a/flyteidl/gen/pb-go/flyteidl/service/cache_grpc.pb.go b/flyteidl/gen/pb-go/flyteidl/service/cache_grpc.pb.go new file mode 100644 index 0000000000..baad43a6c7 --- /dev/null +++ b/flyteidl/gen/pb-go/flyteidl/service/cache_grpc.pb.go @@ -0,0 +1,109 @@ +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.3.0 +// - protoc (unknown) +// source: flyteidl/service/cache.proto + +package service + +import ( + context "context" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" +) + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +// Requires gRPC-Go v1.32.0 or later. +const _ = grpc.SupportPackageIsVersion7 + +const ( + CacheService_EvictTaskExecutionCache_FullMethodName = "/flyteidl.service.CacheService/EvictTaskExecutionCache" +) + +// CacheServiceClient is the client API for CacheService service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +type CacheServiceClient interface { + // Evicts all cached data for the referenced :ref:`ref_flyteidl.admin.TaskExecution`. + EvictTaskExecutionCache(ctx context.Context, in *EvictTaskExecutionCacheRequest, opts ...grpc.CallOption) (*EvictCacheResponse, error) +} + +type cacheServiceClient struct { + cc grpc.ClientConnInterface +} + +func NewCacheServiceClient(cc grpc.ClientConnInterface) CacheServiceClient { + return &cacheServiceClient{cc} +} + +func (c *cacheServiceClient) EvictTaskExecutionCache(ctx context.Context, in *EvictTaskExecutionCacheRequest, opts ...grpc.CallOption) (*EvictCacheResponse, error) { + out := new(EvictCacheResponse) + err := c.cc.Invoke(ctx, CacheService_EvictTaskExecutionCache_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// CacheServiceServer is the server API for CacheService service. +// All implementations should embed UnimplementedCacheServiceServer +// for forward compatibility +type CacheServiceServer interface { + // Evicts all cached data for the referenced :ref:`ref_flyteidl.admin.TaskExecution`. + EvictTaskExecutionCache(context.Context, *EvictTaskExecutionCacheRequest) (*EvictCacheResponse, error) +} + +// UnimplementedCacheServiceServer should be embedded to have forward compatible implementations. +type UnimplementedCacheServiceServer struct { +} + +func (UnimplementedCacheServiceServer) EvictTaskExecutionCache(context.Context, *EvictTaskExecutionCacheRequest) (*EvictCacheResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method EvictTaskExecutionCache not implemented") +} + +// UnsafeCacheServiceServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to CacheServiceServer will +// result in compilation errors. +type UnsafeCacheServiceServer interface { + mustEmbedUnimplementedCacheServiceServer() +} + +func RegisterCacheServiceServer(s grpc.ServiceRegistrar, srv CacheServiceServer) { + s.RegisterService(&CacheService_ServiceDesc, srv) +} + +func _CacheService_EvictTaskExecutionCache_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(EvictTaskExecutionCacheRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(CacheServiceServer).EvictTaskExecutionCache(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: CacheService_EvictTaskExecutionCache_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(CacheServiceServer).EvictTaskExecutionCache(ctx, req.(*EvictTaskExecutionCacheRequest)) + } + return interceptor(ctx, in, info, handler) +} + +// CacheService_ServiceDesc is the grpc.ServiceDesc for CacheService service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var CacheService_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "flyteidl.service.CacheService", + HandlerType: (*CacheServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "EvictTaskExecutionCache", + Handler: _CacheService_EvictTaskExecutionCache_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "flyteidl/service/cache.proto", +} diff --git a/flyteidl/gen/pb-go/gateway/flyteidl/datacatalog/datacatalog.swagger.json b/flyteidl/gen/pb-go/gateway/flyteidl/datacatalog/datacatalog.swagger.json index 1f2f91d28b..fbb3008244 100644 --- a/flyteidl/gen/pb-go/gateway/flyteidl/datacatalog/datacatalog.swagger.json +++ b/flyteidl/gen/pb-go/gateway/flyteidl/datacatalog/datacatalog.swagger.json @@ -592,6 +592,10 @@ }, "title": "Dataset properties we can filter by" }, + "datacatalogDeleteArtifactResponse": { + "type": "object", + "description": "Response message for deleting an Artifact." + }, "datacatalogFilterExpression": { "type": "object", "properties": { diff --git a/flyteidl/gen/pb-go/gateway/flyteidl/service/cache.pb.gw.go b/flyteidl/gen/pb-go/gateway/flyteidl/service/cache.pb.gw.go new file mode 100644 index 0000000000..5f639fea72 --- /dev/null +++ b/flyteidl/gen/pb-go/gateway/flyteidl/service/cache.pb.gw.go @@ -0,0 +1,368 @@ +// Code generated by protoc-gen-grpc-gateway. DO NOT EDIT. +// source: flyteidl/service/cache.proto + +/* +Package service is a reverse proxy. + +It translates gRPC into RESTful JSON APIs. +*/ +package service + +import ( + "context" + "io" + "net/http" + + extService "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/service" + "github.com/grpc-ecosystem/grpc-gateway/v2/runtime" + "github.com/grpc-ecosystem/grpc-gateway/v2/utilities" + "google.golang.org/grpc" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/grpclog" + "google.golang.org/grpc/metadata" + "google.golang.org/grpc/status" + "google.golang.org/protobuf/proto" +) + +// Suppress "imported and not used" errors +var _ codes.Code +var _ io.Reader +var _ status.Status +var _ = runtime.String +var _ = utilities.NewDoubleArray +var _ = metadata.Join + +var ( + filter_CacheService_EvictTaskExecutionCache_0 = &utilities.DoubleArray{Encoding: map[string]int{"task_execution_id": 0, "node_execution_id": 1, "execution_id": 2, "project": 3, "domain": 4, "name": 5, "node_id": 6, "nodeId": 7, "task_id": 8, "version": 9, "retry_attempt": 10, "retryAttempt": 11}, Base: []int{1, 25, 1, 4, 26, 28, 30, 1, 31, 9, 32, 10, 33, 0, 3, 0, 15, 13, 7, 0, 15, 10, 0, 21, 13, 0, 23, 16, 0, 25, 19, 0, 24, 22, 0, 24, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, Check: []int{0, 1, 2, 3, 1, 1, 1, 4, 1, 2, 1, 10, 1, 8, 12, 15, 2, 17, 18, 19, 2, 21, 22, 2, 24, 25, 2, 27, 28, 2, 30, 31, 2, 33, 34, 2, 36, 5, 5, 6, 6, 7, 7, 9, 11, 13}} +) + +func request_CacheService_EvictTaskExecutionCache_0(ctx context.Context, marshaler runtime.Marshaler, client extService.CacheServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq extService.EvictTaskExecutionCacheRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["task_execution_id.node_execution_id.execution_id.project"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "task_execution_id.node_execution_id.execution_id.project") + } + + err = runtime.PopulateFieldFromPath(&protoReq, "task_execution_id.node_execution_id.execution_id.project", val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "task_execution_id.node_execution_id.execution_id.project", err) + } + + val, ok = pathParams["task_execution_id.node_execution_id.execution_id.domain"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "task_execution_id.node_execution_id.execution_id.domain") + } + + err = runtime.PopulateFieldFromPath(&protoReq, "task_execution_id.node_execution_id.execution_id.domain", val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "task_execution_id.node_execution_id.execution_id.domain", err) + } + + val, ok = pathParams["task_execution_id.node_execution_id.execution_id.name"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "task_execution_id.node_execution_id.execution_id.name") + } + + err = runtime.PopulateFieldFromPath(&protoReq, "task_execution_id.node_execution_id.execution_id.name", val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "task_execution_id.node_execution_id.execution_id.name", err) + } + + val, ok = pathParams["task_execution_id.node_execution_id.node_id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "task_execution_id.node_execution_id.node_id") + } + + err = runtime.PopulateFieldFromPath(&protoReq, "task_execution_id.node_execution_id.node_id", val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "task_execution_id.node_execution_id.node_id", err) + } + + val, ok = pathParams["task_execution_id.task_id.project"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "task_execution_id.task_id.project") + } + + err = runtime.PopulateFieldFromPath(&protoReq, "task_execution_id.task_id.project", val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "task_execution_id.task_id.project", err) + } + + val, ok = pathParams["task_execution_id.task_id.domain"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "task_execution_id.task_id.domain") + } + + err = runtime.PopulateFieldFromPath(&protoReq, "task_execution_id.task_id.domain", val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "task_execution_id.task_id.domain", err) + } + + val, ok = pathParams["task_execution_id.task_id.name"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "task_execution_id.task_id.name") + } + + err = runtime.PopulateFieldFromPath(&protoReq, "task_execution_id.task_id.name", val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "task_execution_id.task_id.name", err) + } + + val, ok = pathParams["task_execution_id.task_id.version"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "task_execution_id.task_id.version") + } + + err = runtime.PopulateFieldFromPath(&protoReq, "task_execution_id.task_id.version", val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "task_execution_id.task_id.version", err) + } + + val, ok = pathParams["task_execution_id.retry_attempt"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "task_execution_id.retry_attempt") + } + + err = runtime.PopulateFieldFromPath(&protoReq, "task_execution_id.retry_attempt", val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "task_execution_id.retry_attempt", err) + } + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_CacheService_EvictTaskExecutionCache_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.EvictTaskExecutionCache(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_CacheService_EvictTaskExecutionCache_0(ctx context.Context, marshaler runtime.Marshaler, server extService.CacheServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq extService.EvictTaskExecutionCacheRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["task_execution_id.node_execution_id.execution_id.project"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "task_execution_id.node_execution_id.execution_id.project") + } + + err = runtime.PopulateFieldFromPath(&protoReq, "task_execution_id.node_execution_id.execution_id.project", val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "task_execution_id.node_execution_id.execution_id.project", err) + } + + val, ok = pathParams["task_execution_id.node_execution_id.execution_id.domain"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "task_execution_id.node_execution_id.execution_id.domain") + } + + err = runtime.PopulateFieldFromPath(&protoReq, "task_execution_id.node_execution_id.execution_id.domain", val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "task_execution_id.node_execution_id.execution_id.domain", err) + } + + val, ok = pathParams["task_execution_id.node_execution_id.execution_id.name"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "task_execution_id.node_execution_id.execution_id.name") + } + + err = runtime.PopulateFieldFromPath(&protoReq, "task_execution_id.node_execution_id.execution_id.name", val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "task_execution_id.node_execution_id.execution_id.name", err) + } + + val, ok = pathParams["task_execution_id.node_execution_id.node_id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "task_execution_id.node_execution_id.node_id") + } + + err = runtime.PopulateFieldFromPath(&protoReq, "task_execution_id.node_execution_id.node_id", val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "task_execution_id.node_execution_id.node_id", err) + } + + val, ok = pathParams["task_execution_id.task_id.project"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "task_execution_id.task_id.project") + } + + err = runtime.PopulateFieldFromPath(&protoReq, "task_execution_id.task_id.project", val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "task_execution_id.task_id.project", err) + } + + val, ok = pathParams["task_execution_id.task_id.domain"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "task_execution_id.task_id.domain") + } + + err = runtime.PopulateFieldFromPath(&protoReq, "task_execution_id.task_id.domain", val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "task_execution_id.task_id.domain", err) + } + + val, ok = pathParams["task_execution_id.task_id.name"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "task_execution_id.task_id.name") + } + + err = runtime.PopulateFieldFromPath(&protoReq, "task_execution_id.task_id.name", val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "task_execution_id.task_id.name", err) + } + + val, ok = pathParams["task_execution_id.task_id.version"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "task_execution_id.task_id.version") + } + + err = runtime.PopulateFieldFromPath(&protoReq, "task_execution_id.task_id.version", val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "task_execution_id.task_id.version", err) + } + + val, ok = pathParams["task_execution_id.retry_attempt"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "task_execution_id.retry_attempt") + } + + err = runtime.PopulateFieldFromPath(&protoReq, "task_execution_id.retry_attempt", val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "task_execution_id.retry_attempt", err) + } + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_CacheService_EvictTaskExecutionCache_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.EvictTaskExecutionCache(ctx, &protoReq) + return msg, metadata, err + +} + +// RegisterCacheServiceHandlerServer registers the http handlers for service CacheService to "mux". +// UnaryRPC :call CacheServiceServer directly. +// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. +// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterCacheServiceHandlerFromEndpoint instead. +func RegisterCacheServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server extService.CacheServiceServer) error { + + mux.Handle("DELETE", pattern_CacheService_EvictTaskExecutionCache_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/flyteidl.service.CacheService/EvictTaskExecutionCache", runtime.WithHTTPPathPattern("/api/v1/cache/task_executions/{task_execution_id.node_execution_id.execution_id.project}/{task_execution_id.node_execution_id.execution_id.domain}/{task_execution_id.node_execution_id.execution_id.name}/{task_execution_id.node_execution_id.node_id}/{task_execution_id.task_id.project}/{task_execution_id.task_id.domain}/{task_execution_id.task_id.name}/{task_execution_id.task_id.version}/{task_execution_id.retry_attempt}")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_CacheService_EvictTaskExecutionCache_0(annotatedContext, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_CacheService_EvictTaskExecutionCache_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + return nil +} + +// RegisterCacheServiceHandlerFromEndpoint is same as RegisterCacheServiceHandler but +// automatically dials to "endpoint" and closes the connection when "ctx" gets done. +func RegisterCacheServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { + conn, err := grpc.DialContext(ctx, endpoint, opts...) + if err != nil { + return err + } + defer func() { + if err != nil { + if cerr := conn.Close(); cerr != nil { + grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + } + return + } + go func() { + <-ctx.Done() + if cerr := conn.Close(); cerr != nil { + grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + } + }() + }() + + return RegisterCacheServiceHandler(ctx, mux, conn) +} + +// RegisterCacheServiceHandler registers the http handlers for service CacheService to "mux". +// The handlers forward requests to the grpc endpoint over "conn". +func RegisterCacheServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error { + return RegisterCacheServiceHandlerClient(ctx, mux, extService.NewCacheServiceClient(conn)) +} + +// RegisterCacheServiceHandlerClient registers the http handlers for service CacheService +// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "extService.CacheServiceClient". +// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "extService.CacheServiceClient" +// doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in +// "extService.CacheServiceClient" to call the correct interceptors. +func RegisterCacheServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client extService.CacheServiceClient) error { + + mux.Handle("DELETE", pattern_CacheService_EvictTaskExecutionCache_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/flyteidl.service.CacheService/EvictTaskExecutionCache", runtime.WithHTTPPathPattern("/api/v1/cache/task_executions/{task_execution_id.node_execution_id.execution_id.project}/{task_execution_id.node_execution_id.execution_id.domain}/{task_execution_id.node_execution_id.execution_id.name}/{task_execution_id.node_execution_id.node_id}/{task_execution_id.task_id.project}/{task_execution_id.task_id.domain}/{task_execution_id.task_id.name}/{task_execution_id.task_id.version}/{task_execution_id.retry_attempt}")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_CacheService_EvictTaskExecutionCache_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_CacheService_EvictTaskExecutionCache_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + return nil +} + +var ( + pattern_CacheService_EvictTaskExecutionCache_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4, 1, 0, 4, 1, 5, 5, 1, 0, 4, 1, 5, 6, 1, 0, 4, 1, 5, 7, 1, 0, 4, 1, 5, 8, 1, 0, 4, 1, 5, 9, 1, 0, 4, 1, 5, 10, 1, 0, 4, 1, 5, 11, 1, 0, 4, 1, 5, 12}, []string{"api", "v1", "cache", "task_executions", "task_execution_id.node_execution_id.execution_id.project", "task_execution_id.node_execution_id.execution_id.domain", "task_execution_id.node_execution_id.execution_id.name", "task_execution_id.node_execution_id.node_id", "task_execution_id.task_id.project", "task_execution_id.task_id.domain", "task_execution_id.task_id.name", "task_execution_id.task_id.version", "task_execution_id.retry_attempt"}, "")) +) + +var ( + forward_CacheService_EvictTaskExecutionCache_0 = runtime.ForwardResponseMessage +) diff --git a/flyteidl/gen/pb-go/gateway/flyteidl/service/cache.swagger.json b/flyteidl/gen/pb-go/gateway/flyteidl/service/cache.swagger.json new file mode 100644 index 0000000000..0ded81251d --- /dev/null +++ b/flyteidl/gen/pb-go/gateway/flyteidl/service/cache.swagger.json @@ -0,0 +1,320 @@ +{ + "swagger": "2.0", + "info": { + "title": "flyteidl/service/cache.proto", + "version": "version not set" + }, + "tags": [ + { + "name": "CacheService" + } + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/api/v1/cache/task_executions/{task_execution_id.node_execution_id.execution_id.project}/{task_execution_id.node_execution_id.execution_id.domain}/{task_execution_id.node_execution_id.execution_id.name}/{task_execution_id.node_execution_id.node_id}/{task_execution_id.task_id.project}/{task_execution_id.task_id.domain}/{task_execution_id.task_id.name}/{task_execution_id.task_id.version}/{task_execution_id.retry_attempt}": { + "delete": { + "summary": "Evicts all cached data for the referenced :ref:`ref_flyteidl.admin.TaskExecution`.", + "operationId": "CacheService_EvictTaskExecutionCache", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/serviceEvictCacheResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/googlerpcStatus" + } + } + }, + "parameters": [ + { + "name": "task_execution_id.node_execution_id.execution_id.project", + "description": "Name of the project the resource belongs to.", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "task_execution_id.node_execution_id.execution_id.domain", + "description": "Name of the domain the resource belongs to.\nA domain can be considered as a subset within a specific project.", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "task_execution_id.node_execution_id.execution_id.name", + "description": "User or system provided value for the resource.", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "task_execution_id.node_execution_id.node_id", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "task_execution_id.task_id.project", + "description": "Name of the project the resource belongs to.", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "task_execution_id.task_id.domain", + "description": "Name of the domain the resource belongs to.\nA domain can be considered as a subset within a specific project.", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "task_execution_id.task_id.name", + "description": "User provided value for the resource.", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "task_execution_id.task_id.version", + "description": "Specific version of the resource.", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "task_execution_id.retry_attempt", + "in": "path", + "required": true, + "type": "integer", + "format": "int64" + }, + { + "name": "task_execution_id.task_id.resource_type", + "description": "Identifies the specific type of resource that this identifier corresponds to.\n\n - DATASET: A dataset represents an entity modeled in Flyte DataCatalog. A Dataset is also a versioned entity and can be a compilation of multiple individual objects.\nEventually all Catalog objects should be modeled similar to Flyte Objects. The Dataset entities makes it possible for the UI and CLI to act on the objects \nin a similar manner to other Flyte objects", + "in": "query", + "required": false, + "type": "string", + "enum": [ + "UNSPECIFIED", + "TASK", + "WORKFLOW", + "LAUNCH_PLAN", + "DATASET" + ], + "default": "UNSPECIFIED" + }, + { + "name": "task_execution_id.task_id.org", + "description": "Optional, org key applied to the resource.", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "task_execution_id.node_execution_id.execution_id.org", + "description": "Optional, org key applied to the resource.", + "in": "query", + "required": false, + "type": "string" + } + ], + "tags": [ + "CacheService" + ] + } + } + }, + "definitions": { + "CacheEvictionErrorCode": { + "type": "string", + "enum": [ + "INTERNAL", + "RESERVATION_NOT_ACQUIRED", + "DATABASE_UPDATE_FAILED", + "ARTIFACT_DELETE_FAILED", + "RESERVATION_NOT_RELEASED" + ], + "default": "INTERNAL", + "description": "Defines codes for distinguishing between errors encountered during cache eviction.\n\n - INTERNAL: Indicates a generic internal error occurred.\n - RESERVATION_NOT_ACQUIRED: Indicates no reservation could be acquired before deleting an artifact.\n - DATABASE_UPDATE_FAILED: Indicates updating the database entry related to the node execution failed.\n - ARTIFACT_DELETE_FAILED: Indicates deleting the artifact from datacatalog failed.\n - RESERVATION_NOT_RELEASED: Indicates the reservation previously acquired could not be released for an artifact." + }, + "coreCacheEvictionError": { + "type": "object", + "properties": { + "code": { + "$ref": "#/definitions/CacheEvictionErrorCode", + "description": "Error code to match type of cache eviction error encountered." + }, + "message": { + "type": "string", + "description": "More detailed error message explaining the reason for the cache eviction failure." + }, + "node_execution_id": { + "$ref": "#/definitions/coreNodeExecutionIdentifier", + "description": "ID of the node execution the cache eviction failed for." + }, + "task_execution_id": { + "$ref": "#/definitions/coreTaskExecutionIdentifier", + "description": "ID of the task execution the cache eviction failed for (if the node execution was part of a task execution)." + }, + "workflow_execution_id": { + "$ref": "#/definitions/coreWorkflowExecutionIdentifier", + "description": "ID of the workflow execution the cache eviction failed for (if the node execution was part of a workflow execution)." + } + }, + "description": "Error returned if eviction of cached output fails and should be re-tried by the user." + }, + "coreCacheEvictionErrorList": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/coreCacheEvictionError" + } + } + }, + "description": "List of :ref:`ref_flyteidl.core.CacheEvictionError` encountered during a cache eviction request." + }, + "coreIdentifier": { + "type": "object", + "properties": { + "resource_type": { + "$ref": "#/definitions/coreResourceType", + "description": "Identifies the specific type of resource that this identifier corresponds to." + }, + "project": { + "type": "string", + "description": "Name of the project the resource belongs to." + }, + "domain": { + "type": "string", + "description": "Name of the domain the resource belongs to.\nA domain can be considered as a subset within a specific project." + }, + "name": { + "type": "string", + "description": "User provided value for the resource." + }, + "version": { + "type": "string", + "description": "Specific version of the resource." + }, + "org": { + "type": "string", + "description": "Optional, org key applied to the resource." + } + }, + "description": "Encapsulation of fields that uniquely identifies a Flyte resource." + }, + "coreNodeExecutionIdentifier": { + "type": "object", + "properties": { + "node_id": { + "type": "string" + }, + "execution_id": { + "$ref": "#/definitions/coreWorkflowExecutionIdentifier" + } + }, + "description": "Encapsulation of fields that identify a Flyte node execution entity." + }, + "coreResourceType": { + "type": "string", + "enum": [ + "UNSPECIFIED", + "TASK", + "WORKFLOW", + "LAUNCH_PLAN", + "DATASET" + ], + "default": "UNSPECIFIED", + "description": "Indicates a resource type within Flyte.\n\n - DATASET: A dataset represents an entity modeled in Flyte DataCatalog. A Dataset is also a versioned entity and can be a compilation of multiple individual objects.\nEventually all Catalog objects should be modeled similar to Flyte Objects. The Dataset entities makes it possible for the UI and CLI to act on the objects \nin a similar manner to other Flyte objects" + }, + "coreTaskExecutionIdentifier": { + "type": "object", + "properties": { + "task_id": { + "$ref": "#/definitions/coreIdentifier" + }, + "node_execution_id": { + "$ref": "#/definitions/coreNodeExecutionIdentifier" + }, + "retry_attempt": { + "type": "integer", + "format": "int64" + } + }, + "description": "Encapsulation of fields that identify a Flyte task execution entity." + }, + "coreWorkflowExecutionIdentifier": { + "type": "object", + "properties": { + "project": { + "type": "string", + "description": "Name of the project the resource belongs to." + }, + "domain": { + "type": "string", + "description": "Name of the domain the resource belongs to.\nA domain can be considered as a subset within a specific project." + }, + "name": { + "type": "string", + "description": "User or system provided value for the resource." + }, + "org": { + "type": "string", + "description": "Optional, org key applied to the resource." + } + }, + "title": "Encapsulation of fields that uniquely identifies a Flyte workflow execution" + }, + "googlerpcStatus": { + "type": "object", + "properties": { + "code": { + "type": "integer", + "format": "int32" + }, + "message": { + "type": "string" + }, + "details": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/protobufAny" + } + } + } + }, + "protobufAny": { + "type": "object", + "properties": { + "@type": { + "type": "string", + "description": "A URL/resource name that uniquely identifies the type of the serialized\nprotocol buffer message. This string must contain at least\none \"/\" character. The last segment of the URL's path must represent\nthe fully qualified name of the type (as in\n`path/google.protobuf.Duration`). The name should be in a canonical form\n(e.g., leading \".\" is not accepted).\n\nIn practice, teams usually precompile into the binary all types that they\nexpect it to use in the context of Any. However, for URLs which use the\nscheme `http`, `https`, or no scheme, one can optionally set up a type\nserver that maps type URLs to message definitions as follows:\n\n* If no scheme is provided, `https` is assumed.\n* An HTTP GET on the URL must yield a [google.protobuf.Type][]\n value in binary format, or produce an error.\n* Applications are allowed to cache lookup results based on the\n URL, or have them precompiled into a binary to avoid any\n lookup. Therefore, binary compatibility needs to be preserved\n on changes to types. (Use versioned type names to manage\n breaking changes.)\n\nNote: this functionality is not currently available in the official\nprotobuf release, and it is not used for type URLs beginning with\ntype.googleapis.com. As of May 2023, there are no widely used type server\nimplementations and no plans to implement one.\n\nSchemes other than `http`, `https` (or the empty scheme) might be\nused with implementation specific semantics." + } + }, + "additionalProperties": {}, + "description": "`Any` contains an arbitrary serialized protocol buffer message along with a\nURL that describes the type of the serialized message.\n\nProtobuf library provides support to pack/unpack Any values in the form\nof utility functions or additional generated methods of the Any type.\n\nExample 1: Pack and unpack a message in C++.\n\n Foo foo = ...;\n Any any;\n any.PackFrom(foo);\n ...\n if (any.UnpackTo(\u0026foo)) {\n ...\n }\n\nExample 2: Pack and unpack a message in Java.\n\n Foo foo = ...;\n Any any = Any.pack(foo);\n ...\n if (any.is(Foo.class)) {\n foo = any.unpack(Foo.class);\n }\n // or ...\n if (any.isSameTypeAs(Foo.getDefaultInstance())) {\n foo = any.unpack(Foo.getDefaultInstance());\n }\n\n Example 3: Pack and unpack a message in Python.\n\n foo = Foo(...)\n any = Any()\n any.Pack(foo)\n ...\n if any.Is(Foo.DESCRIPTOR):\n any.Unpack(foo)\n ...\n\n Example 4: Pack and unpack a message in Go\n\n foo := \u0026pb.Foo{...}\n any, err := anypb.New(foo)\n if err != nil {\n ...\n }\n ...\n foo := \u0026pb.Foo{}\n if err := any.UnmarshalTo(foo); err != nil {\n ...\n }\n\nThe pack methods provided by protobuf library will by default use\n'type.googleapis.com/full.type.name' as the type URL and the unpack\nmethods only use the fully qualified type name after the last '/'\nin the type URL, for example \"foo.bar.com/x/y.z\" will yield type\nname \"y.z\".\n\nJSON\n====\nThe JSON representation of an `Any` value uses the regular\nrepresentation of the deserialized, embedded message, with an\nadditional field `@type` which contains the type URL. Example:\n\n package google.profile;\n message Person {\n string first_name = 1;\n string last_name = 2;\n }\n\n {\n \"@type\": \"type.googleapis.com/google.profile.Person\",\n \"firstName\": \u003cstring\u003e,\n \"lastName\": \u003cstring\u003e\n }\n\nIf the embedded message type is well-known and has a custom JSON\nrepresentation, that representation will be embedded adding a field\n`value` which holds the custom JSON in addition to the `@type`\nfield. Example (for message [google.protobuf.Duration][]):\n\n {\n \"@type\": \"type.googleapis.com/google.protobuf.Duration\",\n \"value\": \"1.212s\"\n }" + }, + "serviceEvictCacheResponse": { + "type": "object", + "properties": { + "errors": { + "$ref": "#/definitions/coreCacheEvictionErrorList", + "description": "List of errors encountered during cache eviction (if any)." + } + } + } + } +} diff --git a/flyteidl/gen/pb-js/flyteidl.d.ts b/flyteidl/gen/pb-js/flyteidl.d.ts index 8c01d5f284..8e10e63e89 100644 --- a/flyteidl/gen/pb-js/flyteidl.d.ts +++ b/flyteidl/gen/pb-js/flyteidl.d.ts @@ -7572,6 +7572,149 @@ export namespace flyteidl { public static verify(message: { [k: string]: any }): (string|null); } + /** Properties of a CacheEvictionError. */ + interface ICacheEvictionError { + + /** CacheEvictionError code */ + code?: (flyteidl.core.CacheEvictionError.Code|null); + + /** CacheEvictionError message */ + message?: (string|null); + + /** CacheEvictionError nodeExecutionId */ + nodeExecutionId?: (flyteidl.core.INodeExecutionIdentifier|null); + + /** CacheEvictionError taskExecutionId */ + taskExecutionId?: (flyteidl.core.ITaskExecutionIdentifier|null); + + /** CacheEvictionError workflowExecutionId */ + workflowExecutionId?: (flyteidl.core.IWorkflowExecutionIdentifier|null); + } + + /** Represents a CacheEvictionError. */ + class CacheEvictionError implements ICacheEvictionError { + + /** + * Constructs a new CacheEvictionError. + * @param [properties] Properties to set + */ + constructor(properties?: flyteidl.core.ICacheEvictionError); + + /** CacheEvictionError code. */ + public code: flyteidl.core.CacheEvictionError.Code; + + /** CacheEvictionError message. */ + public message: string; + + /** CacheEvictionError nodeExecutionId. */ + public nodeExecutionId?: (flyteidl.core.INodeExecutionIdentifier|null); + + /** CacheEvictionError taskExecutionId. */ + public taskExecutionId?: (flyteidl.core.ITaskExecutionIdentifier|null); + + /** CacheEvictionError workflowExecutionId. */ + public workflowExecutionId?: (flyteidl.core.IWorkflowExecutionIdentifier|null); + + /** CacheEvictionError source. */ + public source?: ("taskExecutionId"|"workflowExecutionId"); + + /** + * Creates a new CacheEvictionError instance using the specified properties. + * @param [properties] Properties to set + * @returns CacheEvictionError instance + */ + public static create(properties?: flyteidl.core.ICacheEvictionError): flyteidl.core.CacheEvictionError; + + /** + * Encodes the specified CacheEvictionError message. Does not implicitly {@link flyteidl.core.CacheEvictionError.verify|verify} messages. + * @param message CacheEvictionError message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: flyteidl.core.ICacheEvictionError, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CacheEvictionError message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CacheEvictionError + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): flyteidl.core.CacheEvictionError; + + /** + * Verifies a CacheEvictionError message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + } + + namespace CacheEvictionError { + + /** Code enum. */ + enum Code { + INTERNAL = 0, + RESERVATION_NOT_ACQUIRED = 1, + DATABASE_UPDATE_FAILED = 2, + ARTIFACT_DELETE_FAILED = 3, + RESERVATION_NOT_RELEASED = 4 + } + } + + /** Properties of a CacheEvictionErrorList. */ + interface ICacheEvictionErrorList { + + /** CacheEvictionErrorList errors */ + errors?: (flyteidl.core.ICacheEvictionError[]|null); + } + + /** Represents a CacheEvictionErrorList. */ + class CacheEvictionErrorList implements ICacheEvictionErrorList { + + /** + * Constructs a new CacheEvictionErrorList. + * @param [properties] Properties to set + */ + constructor(properties?: flyteidl.core.ICacheEvictionErrorList); + + /** CacheEvictionErrorList errors. */ + public errors: flyteidl.core.ICacheEvictionError[]; + + /** + * Creates a new CacheEvictionErrorList instance using the specified properties. + * @param [properties] Properties to set + * @returns CacheEvictionErrorList instance + */ + public static create(properties?: flyteidl.core.ICacheEvictionErrorList): flyteidl.core.CacheEvictionErrorList; + + /** + * Encodes the specified CacheEvictionErrorList message. Does not implicitly {@link flyteidl.core.CacheEvictionErrorList.verify|verify} messages. + * @param message CacheEvictionErrorList message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: flyteidl.core.ICacheEvictionErrorList, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CacheEvictionErrorList message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CacheEvictionErrorList + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): flyteidl.core.CacheEvictionErrorList; + + /** + * Verifies a CacheEvictionErrorList message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + } + /** Properties of a Span. */ interface ISpan { @@ -22736,6 +22879,155 @@ export namespace flyteidl { type GetPublicClientConfigCallback = (error: (Error|null), response?: flyteidl.service.PublicClientAuthConfigResponse) => void; } + /** Properties of an EvictTaskExecutionCacheRequest. */ + interface IEvictTaskExecutionCacheRequest { + + /** EvictTaskExecutionCacheRequest taskExecutionId */ + taskExecutionId?: (flyteidl.core.ITaskExecutionIdentifier|null); + } + + /** Represents an EvictTaskExecutionCacheRequest. */ + class EvictTaskExecutionCacheRequest implements IEvictTaskExecutionCacheRequest { + + /** + * Constructs a new EvictTaskExecutionCacheRequest. + * @param [properties] Properties to set + */ + constructor(properties?: flyteidl.service.IEvictTaskExecutionCacheRequest); + + /** EvictTaskExecutionCacheRequest taskExecutionId. */ + public taskExecutionId?: (flyteidl.core.ITaskExecutionIdentifier|null); + + /** + * Creates a new EvictTaskExecutionCacheRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns EvictTaskExecutionCacheRequest instance + */ + public static create(properties?: flyteidl.service.IEvictTaskExecutionCacheRequest): flyteidl.service.EvictTaskExecutionCacheRequest; + + /** + * Encodes the specified EvictTaskExecutionCacheRequest message. Does not implicitly {@link flyteidl.service.EvictTaskExecutionCacheRequest.verify|verify} messages. + * @param message EvictTaskExecutionCacheRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: flyteidl.service.IEvictTaskExecutionCacheRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EvictTaskExecutionCacheRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EvictTaskExecutionCacheRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): flyteidl.service.EvictTaskExecutionCacheRequest; + + /** + * Verifies an EvictTaskExecutionCacheRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + } + + /** Properties of an EvictCacheResponse. */ + interface IEvictCacheResponse { + + /** EvictCacheResponse errors */ + errors?: (flyteidl.core.ICacheEvictionErrorList|null); + } + + /** Represents an EvictCacheResponse. */ + class EvictCacheResponse implements IEvictCacheResponse { + + /** + * Constructs a new EvictCacheResponse. + * @param [properties] Properties to set + */ + constructor(properties?: flyteidl.service.IEvictCacheResponse); + + /** EvictCacheResponse errors. */ + public errors?: (flyteidl.core.ICacheEvictionErrorList|null); + + /** + * Creates a new EvictCacheResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns EvictCacheResponse instance + */ + public static create(properties?: flyteidl.service.IEvictCacheResponse): flyteidl.service.EvictCacheResponse; + + /** + * Encodes the specified EvictCacheResponse message. Does not implicitly {@link flyteidl.service.EvictCacheResponse.verify|verify} messages. + * @param message EvictCacheResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: flyteidl.service.IEvictCacheResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EvictCacheResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EvictCacheResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): flyteidl.service.EvictCacheResponse; + + /** + * Verifies an EvictCacheResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + } + + /** Represents a CacheService */ + class CacheService extends $protobuf.rpc.Service { + + /** + * Constructs a new CacheService service. + * @param rpcImpl RPC implementation + * @param [requestDelimited=false] Whether requests are length-delimited + * @param [responseDelimited=false] Whether responses are length-delimited + */ + constructor(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean); + + /** + * Creates new CacheService service using the specified rpc implementation. + * @param rpcImpl RPC implementation + * @param [requestDelimited=false] Whether requests are length-delimited + * @param [responseDelimited=false] Whether responses are length-delimited + * @returns RPC service. Useful where requests and/or responses are streamed. + */ + public static create(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean): CacheService; + + /** + * Calls EvictTaskExecutionCache. + * @param request EvictTaskExecutionCacheRequest message or plain object + * @param callback Node-style callback called with the error, if any, and EvictCacheResponse + */ + public evictTaskExecutionCache(request: flyteidl.service.IEvictTaskExecutionCacheRequest, callback: flyteidl.service.CacheService.EvictTaskExecutionCacheCallback): void; + + /** + * Calls EvictTaskExecutionCache. + * @param request EvictTaskExecutionCacheRequest message or plain object + * @returns Promise + */ + public evictTaskExecutionCache(request: flyteidl.service.IEvictTaskExecutionCacheRequest): Promise; + } + + namespace CacheService { + + /** + * Callback as used by {@link flyteidl.service.CacheService#evictTaskExecutionCache}. + * @param error Error, if any + * @param [response] EvictCacheResponse + */ + type EvictTaskExecutionCacheCallback = (error: (Error|null), response?: flyteidl.service.EvictCacheResponse) => void; + } + /** Properties of a CreateUploadLocationResponse. */ interface ICreateUploadLocationResponse { diff --git a/flyteidl/gen/pb-js/flyteidl.js b/flyteidl/gen/pb-js/flyteidl.js index fffe330902..4fdaa451f1 100644 --- a/flyteidl/gen/pb-js/flyteidl.js +++ b/flyteidl/gen/pb-js/flyteidl.js @@ -18303,6 +18303,361 @@ return ErrorDocument; })(); + core.CacheEvictionError = (function() { + + /** + * Properties of a CacheEvictionError. + * @memberof flyteidl.core + * @interface ICacheEvictionError + * @property {flyteidl.core.CacheEvictionError.Code|null} [code] CacheEvictionError code + * @property {string|null} [message] CacheEvictionError message + * @property {flyteidl.core.INodeExecutionIdentifier|null} [nodeExecutionId] CacheEvictionError nodeExecutionId + * @property {flyteidl.core.ITaskExecutionIdentifier|null} [taskExecutionId] CacheEvictionError taskExecutionId + * @property {flyteidl.core.IWorkflowExecutionIdentifier|null} [workflowExecutionId] CacheEvictionError workflowExecutionId + */ + + /** + * Constructs a new CacheEvictionError. + * @memberof flyteidl.core + * @classdesc Represents a CacheEvictionError. + * @implements ICacheEvictionError + * @constructor + * @param {flyteidl.core.ICacheEvictionError=} [properties] Properties to set + */ + function CacheEvictionError(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CacheEvictionError code. + * @member {flyteidl.core.CacheEvictionError.Code} code + * @memberof flyteidl.core.CacheEvictionError + * @instance + */ + CacheEvictionError.prototype.code = 0; + + /** + * CacheEvictionError message. + * @member {string} message + * @memberof flyteidl.core.CacheEvictionError + * @instance + */ + CacheEvictionError.prototype.message = ""; + + /** + * CacheEvictionError nodeExecutionId. + * @member {flyteidl.core.INodeExecutionIdentifier|null|undefined} nodeExecutionId + * @memberof flyteidl.core.CacheEvictionError + * @instance + */ + CacheEvictionError.prototype.nodeExecutionId = null; + + /** + * CacheEvictionError taskExecutionId. + * @member {flyteidl.core.ITaskExecutionIdentifier|null|undefined} taskExecutionId + * @memberof flyteidl.core.CacheEvictionError + * @instance + */ + CacheEvictionError.prototype.taskExecutionId = null; + + /** + * CacheEvictionError workflowExecutionId. + * @member {flyteidl.core.IWorkflowExecutionIdentifier|null|undefined} workflowExecutionId + * @memberof flyteidl.core.CacheEvictionError + * @instance + */ + CacheEvictionError.prototype.workflowExecutionId = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * CacheEvictionError source. + * @member {"taskExecutionId"|"workflowExecutionId"|undefined} source + * @memberof flyteidl.core.CacheEvictionError + * @instance + */ + Object.defineProperty(CacheEvictionError.prototype, "source", { + get: $util.oneOfGetter($oneOfFields = ["taskExecutionId", "workflowExecutionId"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new CacheEvictionError instance using the specified properties. + * @function create + * @memberof flyteidl.core.CacheEvictionError + * @static + * @param {flyteidl.core.ICacheEvictionError=} [properties] Properties to set + * @returns {flyteidl.core.CacheEvictionError} CacheEvictionError instance + */ + CacheEvictionError.create = function create(properties) { + return new CacheEvictionError(properties); + }; + + /** + * Encodes the specified CacheEvictionError message. Does not implicitly {@link flyteidl.core.CacheEvictionError.verify|verify} messages. + * @function encode + * @memberof flyteidl.core.CacheEvictionError + * @static + * @param {flyteidl.core.ICacheEvictionError} message CacheEvictionError message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CacheEvictionError.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.code != null && message.hasOwnProperty("code")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.code); + if (message.message != null && message.hasOwnProperty("message")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.message); + if (message.nodeExecutionId != null && message.hasOwnProperty("nodeExecutionId")) + $root.flyteidl.core.NodeExecutionIdentifier.encode(message.nodeExecutionId, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.taskExecutionId != null && message.hasOwnProperty("taskExecutionId")) + $root.flyteidl.core.TaskExecutionIdentifier.encode(message.taskExecutionId, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.workflowExecutionId != null && message.hasOwnProperty("workflowExecutionId")) + $root.flyteidl.core.WorkflowExecutionIdentifier.encode(message.workflowExecutionId, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + return writer; + }; + + /** + * Decodes a CacheEvictionError message from the specified reader or buffer. + * @function decode + * @memberof flyteidl.core.CacheEvictionError + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {flyteidl.core.CacheEvictionError} CacheEvictionError + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CacheEvictionError.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.flyteidl.core.CacheEvictionError(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.code = reader.int32(); + break; + case 2: + message.message = reader.string(); + break; + case 3: + message.nodeExecutionId = $root.flyteidl.core.NodeExecutionIdentifier.decode(reader, reader.uint32()); + break; + case 4: + message.taskExecutionId = $root.flyteidl.core.TaskExecutionIdentifier.decode(reader, reader.uint32()); + break; + case 5: + message.workflowExecutionId = $root.flyteidl.core.WorkflowExecutionIdentifier.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Verifies a CacheEvictionError message. + * @function verify + * @memberof flyteidl.core.CacheEvictionError + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CacheEvictionError.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.code != null && message.hasOwnProperty("code")) + switch (message.code) { + default: + return "code: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + break; + } + if (message.message != null && message.hasOwnProperty("message")) + if (!$util.isString(message.message)) + return "message: string expected"; + if (message.nodeExecutionId != null && message.hasOwnProperty("nodeExecutionId")) { + var error = $root.flyteidl.core.NodeExecutionIdentifier.verify(message.nodeExecutionId); + if (error) + return "nodeExecutionId." + error; + } + if (message.taskExecutionId != null && message.hasOwnProperty("taskExecutionId")) { + properties.source = 1; + { + var error = $root.flyteidl.core.TaskExecutionIdentifier.verify(message.taskExecutionId); + if (error) + return "taskExecutionId." + error; + } + } + if (message.workflowExecutionId != null && message.hasOwnProperty("workflowExecutionId")) { + if (properties.source === 1) + return "source: multiple values"; + properties.source = 1; + { + var error = $root.flyteidl.core.WorkflowExecutionIdentifier.verify(message.workflowExecutionId); + if (error) + return "workflowExecutionId." + error; + } + } + return null; + }; + + /** + * Code enum. + * @name flyteidl.core.CacheEvictionError.Code + * @enum {string} + * @property {number} INTERNAL=0 INTERNAL value + * @property {number} RESERVATION_NOT_ACQUIRED=1 RESERVATION_NOT_ACQUIRED value + * @property {number} DATABASE_UPDATE_FAILED=2 DATABASE_UPDATE_FAILED value + * @property {number} ARTIFACT_DELETE_FAILED=3 ARTIFACT_DELETE_FAILED value + * @property {number} RESERVATION_NOT_RELEASED=4 RESERVATION_NOT_RELEASED value + */ + CacheEvictionError.Code = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "INTERNAL"] = 0; + values[valuesById[1] = "RESERVATION_NOT_ACQUIRED"] = 1; + values[valuesById[2] = "DATABASE_UPDATE_FAILED"] = 2; + values[valuesById[3] = "ARTIFACT_DELETE_FAILED"] = 3; + values[valuesById[4] = "RESERVATION_NOT_RELEASED"] = 4; + return values; + })(); + + return CacheEvictionError; + })(); + + core.CacheEvictionErrorList = (function() { + + /** + * Properties of a CacheEvictionErrorList. + * @memberof flyteidl.core + * @interface ICacheEvictionErrorList + * @property {Array.|null} [errors] CacheEvictionErrorList errors + */ + + /** + * Constructs a new CacheEvictionErrorList. + * @memberof flyteidl.core + * @classdesc Represents a CacheEvictionErrorList. + * @implements ICacheEvictionErrorList + * @constructor + * @param {flyteidl.core.ICacheEvictionErrorList=} [properties] Properties to set + */ + function CacheEvictionErrorList(properties) { + this.errors = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CacheEvictionErrorList errors. + * @member {Array.} errors + * @memberof flyteidl.core.CacheEvictionErrorList + * @instance + */ + CacheEvictionErrorList.prototype.errors = $util.emptyArray; + + /** + * Creates a new CacheEvictionErrorList instance using the specified properties. + * @function create + * @memberof flyteidl.core.CacheEvictionErrorList + * @static + * @param {flyteidl.core.ICacheEvictionErrorList=} [properties] Properties to set + * @returns {flyteidl.core.CacheEvictionErrorList} CacheEvictionErrorList instance + */ + CacheEvictionErrorList.create = function create(properties) { + return new CacheEvictionErrorList(properties); + }; + + /** + * Encodes the specified CacheEvictionErrorList message. Does not implicitly {@link flyteidl.core.CacheEvictionErrorList.verify|verify} messages. + * @function encode + * @memberof flyteidl.core.CacheEvictionErrorList + * @static + * @param {flyteidl.core.ICacheEvictionErrorList} message CacheEvictionErrorList message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CacheEvictionErrorList.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.errors != null && message.errors.length) + for (var i = 0; i < message.errors.length; ++i) + $root.flyteidl.core.CacheEvictionError.encode(message.errors[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Decodes a CacheEvictionErrorList message from the specified reader or buffer. + * @function decode + * @memberof flyteidl.core.CacheEvictionErrorList + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {flyteidl.core.CacheEvictionErrorList} CacheEvictionErrorList + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CacheEvictionErrorList.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.flyteidl.core.CacheEvictionErrorList(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.errors && message.errors.length)) + message.errors = []; + message.errors.push($root.flyteidl.core.CacheEvictionError.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Verifies a CacheEvictionErrorList message. + * @function verify + * @memberof flyteidl.core.CacheEvictionErrorList + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CacheEvictionErrorList.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.errors != null && message.hasOwnProperty("errors")) { + if (!Array.isArray(message.errors)) + return "errors: array expected"; + for (var i = 0; i < message.errors.length; ++i) { + var error = $root.flyteidl.core.CacheEvictionError.verify(message.errors[i]); + if (error) + return "errors." + error; + } + } + return null; + }; + + return CacheEvictionErrorList; + })(); + core.Span = (function() { /** @@ -53321,6 +53676,298 @@ return AuthMetadataService; })(); + service.EvictTaskExecutionCacheRequest = (function() { + + /** + * Properties of an EvictTaskExecutionCacheRequest. + * @memberof flyteidl.service + * @interface IEvictTaskExecutionCacheRequest + * @property {flyteidl.core.ITaskExecutionIdentifier|null} [taskExecutionId] EvictTaskExecutionCacheRequest taskExecutionId + */ + + /** + * Constructs a new EvictTaskExecutionCacheRequest. + * @memberof flyteidl.service + * @classdesc Represents an EvictTaskExecutionCacheRequest. + * @implements IEvictTaskExecutionCacheRequest + * @constructor + * @param {flyteidl.service.IEvictTaskExecutionCacheRequest=} [properties] Properties to set + */ + function EvictTaskExecutionCacheRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * EvictTaskExecutionCacheRequest taskExecutionId. + * @member {flyteidl.core.ITaskExecutionIdentifier|null|undefined} taskExecutionId + * @memberof flyteidl.service.EvictTaskExecutionCacheRequest + * @instance + */ + EvictTaskExecutionCacheRequest.prototype.taskExecutionId = null; + + /** + * Creates a new EvictTaskExecutionCacheRequest instance using the specified properties. + * @function create + * @memberof flyteidl.service.EvictTaskExecutionCacheRequest + * @static + * @param {flyteidl.service.IEvictTaskExecutionCacheRequest=} [properties] Properties to set + * @returns {flyteidl.service.EvictTaskExecutionCacheRequest} EvictTaskExecutionCacheRequest instance + */ + EvictTaskExecutionCacheRequest.create = function create(properties) { + return new EvictTaskExecutionCacheRequest(properties); + }; + + /** + * Encodes the specified EvictTaskExecutionCacheRequest message. Does not implicitly {@link flyteidl.service.EvictTaskExecutionCacheRequest.verify|verify} messages. + * @function encode + * @memberof flyteidl.service.EvictTaskExecutionCacheRequest + * @static + * @param {flyteidl.service.IEvictTaskExecutionCacheRequest} message EvictTaskExecutionCacheRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EvictTaskExecutionCacheRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.taskExecutionId != null && message.hasOwnProperty("taskExecutionId")) + $root.flyteidl.core.TaskExecutionIdentifier.encode(message.taskExecutionId, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Decodes an EvictTaskExecutionCacheRequest message from the specified reader or buffer. + * @function decode + * @memberof flyteidl.service.EvictTaskExecutionCacheRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {flyteidl.service.EvictTaskExecutionCacheRequest} EvictTaskExecutionCacheRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EvictTaskExecutionCacheRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.flyteidl.service.EvictTaskExecutionCacheRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.taskExecutionId = $root.flyteidl.core.TaskExecutionIdentifier.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Verifies an EvictTaskExecutionCacheRequest message. + * @function verify + * @memberof flyteidl.service.EvictTaskExecutionCacheRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EvictTaskExecutionCacheRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.taskExecutionId != null && message.hasOwnProperty("taskExecutionId")) { + var error = $root.flyteidl.core.TaskExecutionIdentifier.verify(message.taskExecutionId); + if (error) + return "taskExecutionId." + error; + } + return null; + }; + + return EvictTaskExecutionCacheRequest; + })(); + + service.EvictCacheResponse = (function() { + + /** + * Properties of an EvictCacheResponse. + * @memberof flyteidl.service + * @interface IEvictCacheResponse + * @property {flyteidl.core.ICacheEvictionErrorList|null} [errors] EvictCacheResponse errors + */ + + /** + * Constructs a new EvictCacheResponse. + * @memberof flyteidl.service + * @classdesc Represents an EvictCacheResponse. + * @implements IEvictCacheResponse + * @constructor + * @param {flyteidl.service.IEvictCacheResponse=} [properties] Properties to set + */ + function EvictCacheResponse(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * EvictCacheResponse errors. + * @member {flyteidl.core.ICacheEvictionErrorList|null|undefined} errors + * @memberof flyteidl.service.EvictCacheResponse + * @instance + */ + EvictCacheResponse.prototype.errors = null; + + /** + * Creates a new EvictCacheResponse instance using the specified properties. + * @function create + * @memberof flyteidl.service.EvictCacheResponse + * @static + * @param {flyteidl.service.IEvictCacheResponse=} [properties] Properties to set + * @returns {flyteidl.service.EvictCacheResponse} EvictCacheResponse instance + */ + EvictCacheResponse.create = function create(properties) { + return new EvictCacheResponse(properties); + }; + + /** + * Encodes the specified EvictCacheResponse message. Does not implicitly {@link flyteidl.service.EvictCacheResponse.verify|verify} messages. + * @function encode + * @memberof flyteidl.service.EvictCacheResponse + * @static + * @param {flyteidl.service.IEvictCacheResponse} message EvictCacheResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EvictCacheResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.errors != null && message.hasOwnProperty("errors")) + $root.flyteidl.core.CacheEvictionErrorList.encode(message.errors, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Decodes an EvictCacheResponse message from the specified reader or buffer. + * @function decode + * @memberof flyteidl.service.EvictCacheResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {flyteidl.service.EvictCacheResponse} EvictCacheResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EvictCacheResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.flyteidl.service.EvictCacheResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.errors = $root.flyteidl.core.CacheEvictionErrorList.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Verifies an EvictCacheResponse message. + * @function verify + * @memberof flyteidl.service.EvictCacheResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EvictCacheResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.errors != null && message.hasOwnProperty("errors")) { + var error = $root.flyteidl.core.CacheEvictionErrorList.verify(message.errors); + if (error) + return "errors." + error; + } + return null; + }; + + return EvictCacheResponse; + })(); + + service.CacheService = (function() { + + /** + * Constructs a new CacheService service. + * @memberof flyteidl.service + * @classdesc Represents a CacheService + * @extends $protobuf.rpc.Service + * @constructor + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + */ + function CacheService(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + } + + (CacheService.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = CacheService; + + /** + * Creates new CacheService service using the specified rpc implementation. + * @function create + * @memberof flyteidl.service.CacheService + * @static + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + * @returns {CacheService} RPC service. Useful where requests and/or responses are streamed. + */ + CacheService.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; + + /** + * Callback as used by {@link flyteidl.service.CacheService#evictTaskExecutionCache}. + * @memberof flyteidl.service.CacheService + * @typedef EvictTaskExecutionCacheCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {flyteidl.service.EvictCacheResponse} [response] EvictCacheResponse + */ + + /** + * Calls EvictTaskExecutionCache. + * @function evictTaskExecutionCache + * @memberof flyteidl.service.CacheService + * @instance + * @param {flyteidl.service.IEvictTaskExecutionCacheRequest} request EvictTaskExecutionCacheRequest message or plain object + * @param {flyteidl.service.CacheService.EvictTaskExecutionCacheCallback} callback Node-style callback called with the error, if any, and EvictCacheResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(CacheService.prototype.evictTaskExecutionCache = function evictTaskExecutionCache(request, callback) { + return this.rpcCall(evictTaskExecutionCache, $root.flyteidl.service.EvictTaskExecutionCacheRequest, $root.flyteidl.service.EvictCacheResponse, request, callback); + }, "name", { value: "EvictTaskExecutionCache" }); + + /** + * Calls EvictTaskExecutionCache. + * @function evictTaskExecutionCache + * @memberof flyteidl.service.CacheService + * @instance + * @param {flyteidl.service.IEvictTaskExecutionCacheRequest} request EvictTaskExecutionCacheRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + return CacheService; + })(); + service.CreateUploadLocationResponse = (function() { /** diff --git a/flyteidl/gen/pb_python/flyteidl/core/errors_pb2.py b/flyteidl/gen/pb_python/flyteidl/core/errors_pb2.py index 68182fd259..0ea330e62d 100644 --- a/flyteidl/gen/pb_python/flyteidl/core/errors_pb2.py +++ b/flyteidl/gen/pb_python/flyteidl/core/errors_pb2.py @@ -12,9 +12,10 @@ from flyteidl.core import execution_pb2 as flyteidl_dot_core_dot_execution__pb2 +from flyteidl.core import identifier_pb2 as flyteidl_dot_core_dot_identifier__pb2 -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1a\x66lyteidl/core/errors.proto\x12\rflyteidl.core\x1a\x1d\x66lyteidl/core/execution.proto\"\xe5\x01\n\x0e\x43ontainerError\x12\x12\n\x04\x63ode\x18\x01 \x01(\tR\x04\x63ode\x12\x18\n\x07message\x18\x02 \x01(\tR\x07message\x12\x36\n\x04kind\x18\x03 \x01(\x0e\x32\".flyteidl.core.ContainerError.KindR\x04kind\x12?\n\x06origin\x18\x04 \x01(\x0e\x32\'.flyteidl.core.ExecutionError.ErrorKindR\x06origin\",\n\x04Kind\x12\x13\n\x0fNON_RECOVERABLE\x10\x00\x12\x0f\n\x0bRECOVERABLE\x10\x01\"D\n\rErrorDocument\x12\x33\n\x05\x65rror\x18\x01 \x01(\x0b\x32\x1d.flyteidl.core.ContainerErrorR\x05\x65rrorB\xb1\x01\n\x11\x63om.flyteidl.coreB\x0b\x45rrorsProtoP\x01Z:github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/core\xa2\x02\x03\x46\x43X\xaa\x02\rFlyteidl.Core\xca\x02\rFlyteidl\\Core\xe2\x02\x19\x46lyteidl\\Core\\GPBMetadata\xea\x02\x0e\x46lyteidl::Coreb\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1a\x66lyteidl/core/errors.proto\x12\rflyteidl.core\x1a\x1d\x66lyteidl/core/execution.proto\x1a\x1e\x66lyteidl/core/identifier.proto\"\xe5\x01\n\x0e\x43ontainerError\x12\x12\n\x04\x63ode\x18\x01 \x01(\tR\x04\x63ode\x12\x18\n\x07message\x18\x02 \x01(\tR\x07message\x12\x36\n\x04kind\x18\x03 \x01(\x0e\x32\".flyteidl.core.ContainerError.KindR\x04kind\x12?\n\x06origin\x18\x04 \x01(\x0e\x32\'.flyteidl.core.ExecutionError.ErrorKindR\x06origin\",\n\x04Kind\x12\x13\n\x0fNON_RECOVERABLE\x10\x00\x12\x0f\n\x0bRECOVERABLE\x10\x01\"D\n\rErrorDocument\x12\x33\n\x05\x65rror\x18\x01 \x01(\x0b\x32\x1d.flyteidl.core.ContainerErrorR\x05\x65rror\"\x8b\x04\n\x12\x43\x61\x63heEvictionError\x12:\n\x04\x63ode\x18\x01 \x01(\x0e\x32&.flyteidl.core.CacheEvictionError.CodeR\x04\x63ode\x12\x18\n\x07message\x18\x02 \x01(\tR\x07message\x12R\n\x11node_execution_id\x18\x03 \x01(\x0b\x32&.flyteidl.core.NodeExecutionIdentifierR\x0fnodeExecutionId\x12T\n\x11task_execution_id\x18\x04 \x01(\x0b\x32&.flyteidl.core.TaskExecutionIdentifierH\x00R\x0ftaskExecutionId\x12`\n\x15workflow_execution_id\x18\x05 \x01(\x0b\x32*.flyteidl.core.WorkflowExecutionIdentifierH\x00R\x13workflowExecutionId\"\x88\x01\n\x04\x43ode\x12\x0c\n\x08INTERNAL\x10\x00\x12\x1c\n\x18RESERVATION_NOT_ACQUIRED\x10\x01\x12\x1a\n\x16\x44\x41TABASE_UPDATE_FAILED\x10\x02\x12\x1a\n\x16\x41RTIFACT_DELETE_FAILED\x10\x03\x12\x1c\n\x18RESERVATION_NOT_RELEASED\x10\x04\x42\x08\n\x06source\"S\n\x16\x43\x61\x63heEvictionErrorList\x12\x39\n\x06\x65rrors\x18\x01 \x03(\x0b\x32!.flyteidl.core.CacheEvictionErrorR\x06\x65rrorsB\xb1\x01\n\x11\x63om.flyteidl.coreB\x0b\x45rrorsProtoP\x01Z:github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/core\xa2\x02\x03\x46\x43X\xaa\x02\rFlyteidl.Core\xca\x02\rFlyteidl\\Core\xe2\x02\x19\x46lyteidl\\Core\\GPBMetadata\xea\x02\x0e\x46lyteidl::Coreb\x06proto3') _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) @@ -23,10 +24,16 @@ DESCRIPTOR._options = None DESCRIPTOR._serialized_options = b'\n\021com.flyteidl.coreB\013ErrorsProtoP\001Z:github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/core\242\002\003FCX\252\002\rFlyteidl.Core\312\002\rFlyteidl\\Core\342\002\031Flyteidl\\Core\\GPBMetadata\352\002\016Flyteidl::Core' - _globals['_CONTAINERERROR']._serialized_start=77 - _globals['_CONTAINERERROR']._serialized_end=306 - _globals['_CONTAINERERROR_KIND']._serialized_start=262 - _globals['_CONTAINERERROR_KIND']._serialized_end=306 - _globals['_ERRORDOCUMENT']._serialized_start=308 - _globals['_ERRORDOCUMENT']._serialized_end=376 + _globals['_CONTAINERERROR']._serialized_start=109 + _globals['_CONTAINERERROR']._serialized_end=338 + _globals['_CONTAINERERROR_KIND']._serialized_start=294 + _globals['_CONTAINERERROR_KIND']._serialized_end=338 + _globals['_ERRORDOCUMENT']._serialized_start=340 + _globals['_ERRORDOCUMENT']._serialized_end=408 + _globals['_CACHEEVICTIONERROR']._serialized_start=411 + _globals['_CACHEEVICTIONERROR']._serialized_end=934 + _globals['_CACHEEVICTIONERROR_CODE']._serialized_start=788 + _globals['_CACHEEVICTIONERROR_CODE']._serialized_end=924 + _globals['_CACHEEVICTIONERRORLIST']._serialized_start=936 + _globals['_CACHEEVICTIONERRORLIST']._serialized_end=1019 # @@protoc_insertion_point(module_scope) diff --git a/flyteidl/gen/pb_python/flyteidl/core/errors_pb2.pyi b/flyteidl/gen/pb_python/flyteidl/core/errors_pb2.pyi index b13aa40915..6954a6a349 100644 --- a/flyteidl/gen/pb_python/flyteidl/core/errors_pb2.pyi +++ b/flyteidl/gen/pb_python/flyteidl/core/errors_pb2.pyi @@ -1,8 +1,10 @@ from flyteidl.core import execution_pb2 as _execution_pb2 +from flyteidl.core import identifier_pb2 as _identifier_pb2 +from google.protobuf.internal import containers as _containers from google.protobuf.internal import enum_type_wrapper as _enum_type_wrapper from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message -from typing import ClassVar as _ClassVar, Mapping as _Mapping, Optional as _Optional, Union as _Union +from typing import ClassVar as _ClassVar, Iterable as _Iterable, Mapping as _Mapping, Optional as _Optional, Union as _Union DESCRIPTOR: _descriptor.FileDescriptor @@ -29,3 +31,35 @@ class ErrorDocument(_message.Message): ERROR_FIELD_NUMBER: _ClassVar[int] error: ContainerError def __init__(self, error: _Optional[_Union[ContainerError, _Mapping]] = ...) -> None: ... + +class CacheEvictionError(_message.Message): + __slots__ = ["code", "message", "node_execution_id", "task_execution_id", "workflow_execution_id"] + class Code(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): + __slots__ = [] + INTERNAL: _ClassVar[CacheEvictionError.Code] + RESERVATION_NOT_ACQUIRED: _ClassVar[CacheEvictionError.Code] + DATABASE_UPDATE_FAILED: _ClassVar[CacheEvictionError.Code] + ARTIFACT_DELETE_FAILED: _ClassVar[CacheEvictionError.Code] + RESERVATION_NOT_RELEASED: _ClassVar[CacheEvictionError.Code] + INTERNAL: CacheEvictionError.Code + RESERVATION_NOT_ACQUIRED: CacheEvictionError.Code + DATABASE_UPDATE_FAILED: CacheEvictionError.Code + ARTIFACT_DELETE_FAILED: CacheEvictionError.Code + RESERVATION_NOT_RELEASED: CacheEvictionError.Code + CODE_FIELD_NUMBER: _ClassVar[int] + MESSAGE_FIELD_NUMBER: _ClassVar[int] + NODE_EXECUTION_ID_FIELD_NUMBER: _ClassVar[int] + TASK_EXECUTION_ID_FIELD_NUMBER: _ClassVar[int] + WORKFLOW_EXECUTION_ID_FIELD_NUMBER: _ClassVar[int] + code: CacheEvictionError.Code + message: str + node_execution_id: _identifier_pb2.NodeExecutionIdentifier + task_execution_id: _identifier_pb2.TaskExecutionIdentifier + workflow_execution_id: _identifier_pb2.WorkflowExecutionIdentifier + def __init__(self, code: _Optional[_Union[CacheEvictionError.Code, str]] = ..., message: _Optional[str] = ..., node_execution_id: _Optional[_Union[_identifier_pb2.NodeExecutionIdentifier, _Mapping]] = ..., task_execution_id: _Optional[_Union[_identifier_pb2.TaskExecutionIdentifier, _Mapping]] = ..., workflow_execution_id: _Optional[_Union[_identifier_pb2.WorkflowExecutionIdentifier, _Mapping]] = ...) -> None: ... + +class CacheEvictionErrorList(_message.Message): + __slots__ = ["errors"] + ERRORS_FIELD_NUMBER: _ClassVar[int] + errors: _containers.RepeatedCompositeFieldContainer[CacheEvictionError] + def __init__(self, errors: _Optional[_Iterable[_Union[CacheEvictionError, _Mapping]]] = ...) -> None: ... diff --git a/flyteidl/gen/pb_python/flyteidl/datacatalog/datacatalog_pb2.py b/flyteidl/gen/pb_python/flyteidl/datacatalog/datacatalog_pb2.py index c5699b3c85..c381d0dbe3 100644 --- a/flyteidl/gen/pb_python/flyteidl/datacatalog/datacatalog_pb2.py +++ b/flyteidl/gen/pb_python/flyteidl/datacatalog/datacatalog_pb2.py @@ -16,7 +16,7 @@ from google.protobuf import timestamp_pb2 as google_dot_protobuf_dot_timestamp__pb2 -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n&flyteidl/datacatalog/datacatalog.proto\x12\x0b\x64\x61tacatalog\x1a\x1c\x66lyteidl/core/literals.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"F\n\x14\x43reateDatasetRequest\x12.\n\x07\x64\x61taset\x18\x01 \x01(\x0b\x32\x14.datacatalog.DatasetR\x07\x64\x61taset\"\x17\n\x15\x43reateDatasetResponse\"E\n\x11GetDatasetRequest\x12\x30\n\x07\x64\x61taset\x18\x01 \x01(\x0b\x32\x16.datacatalog.DatasetIDR\x07\x64\x61taset\"D\n\x12GetDatasetResponse\x12.\n\x07\x64\x61taset\x18\x01 \x01(\x0b\x32\x14.datacatalog.DatasetR\x07\x64\x61taset\"\x96\x01\n\x12GetArtifactRequest\x12\x30\n\x07\x64\x61taset\x18\x01 \x01(\x0b\x32\x16.datacatalog.DatasetIDR\x07\x64\x61taset\x12!\n\x0b\x61rtifact_id\x18\x02 \x01(\tH\x00R\nartifactId\x12\x1b\n\x08tag_name\x18\x03 \x01(\tH\x00R\x07tagNameB\x0e\n\x0cquery_handle\"H\n\x13GetArtifactResponse\x12\x31\n\x08\x61rtifact\x18\x01 \x01(\x0b\x32\x15.datacatalog.ArtifactR\x08\x61rtifact\"J\n\x15\x43reateArtifactRequest\x12\x31\n\x08\x61rtifact\x18\x01 \x01(\x0b\x32\x15.datacatalog.ArtifactR\x08\x61rtifact\"\x18\n\x16\x43reateArtifactResponse\"3\n\rAddTagRequest\x12\"\n\x03tag\x18\x01 \x01(\x0b\x32\x10.datacatalog.TagR\x03tag\"\x10\n\x0e\x41\x64\x64TagResponse\"\xbf\x01\n\x14ListArtifactsRequest\x12\x30\n\x07\x64\x61taset\x18\x01 \x01(\x0b\x32\x16.datacatalog.DatasetIDR\x07\x64\x61taset\x12\x35\n\x06\x66ilter\x18\x02 \x01(\x0b\x32\x1d.datacatalog.FilterExpressionR\x06\x66ilter\x12>\n\npagination\x18\x03 \x01(\x0b\x32\x1e.datacatalog.PaginationOptionsR\npagination\"k\n\x15ListArtifactsResponse\x12\x33\n\tartifacts\x18\x01 \x03(\x0b\x32\x15.datacatalog.ArtifactR\tartifacts\x12\x1d\n\nnext_token\x18\x02 \x01(\tR\tnextToken\"\x8c\x01\n\x13ListDatasetsRequest\x12\x35\n\x06\x66ilter\x18\x01 \x01(\x0b\x32\x1d.datacatalog.FilterExpressionR\x06\x66ilter\x12>\n\npagination\x18\x02 \x01(\x0b\x32\x1e.datacatalog.PaginationOptionsR\npagination\"g\n\x14ListDatasetsResponse\x12\x30\n\x08\x64\x61tasets\x18\x01 \x03(\x0b\x32\x14.datacatalog.DatasetR\x08\x64\x61tasets\x12\x1d\n\nnext_token\x18\x02 \x01(\tR\tnextToken\"\xfb\x01\n\x15UpdateArtifactRequest\x12\x30\n\x07\x64\x61taset\x18\x01 \x01(\x0b\x32\x16.datacatalog.DatasetIDR\x07\x64\x61taset\x12!\n\x0b\x61rtifact_id\x18\x02 \x01(\tH\x00R\nartifactId\x12\x1b\n\x08tag_name\x18\x03 \x01(\tH\x00R\x07tagName\x12-\n\x04\x64\x61ta\x18\x04 \x03(\x0b\x32\x19.datacatalog.ArtifactDataR\x04\x64\x61ta\x12\x31\n\x08metadata\x18\x05 \x01(\x0b\x32\x15.datacatalog.MetadataR\x08metadataB\x0e\n\x0cquery_handle\"9\n\x16UpdateArtifactResponse\x12\x1f\n\x0b\x61rtifact_id\x18\x01 \x01(\tR\nartifactId\"a\n\rReservationID\x12\x35\n\ndataset_id\x18\x01 \x01(\x0b\x32\x16.datacatalog.DatasetIDR\tdatasetId\x12\x19\n\x08tag_name\x18\x02 \x01(\tR\x07tagName\"\xc7\x01\n\x1dGetOrExtendReservationRequest\x12\x41\n\x0ereservation_id\x18\x01 \x01(\x0b\x32\x1a.datacatalog.ReservationIDR\rreservationId\x12\x19\n\x08owner_id\x18\x02 \x01(\tR\x07ownerId\x12H\n\x12heartbeat_interval\x18\x03 \x01(\x0b\x32\x19.google.protobuf.DurationR\x11heartbeatInterval\"\xa3\x02\n\x0bReservation\x12\x41\n\x0ereservation_id\x18\x01 \x01(\x0b\x32\x1a.datacatalog.ReservationIDR\rreservationId\x12\x19\n\x08owner_id\x18\x02 \x01(\tR\x07ownerId\x12H\n\x12heartbeat_interval\x18\x03 \x01(\x0b\x32\x19.google.protobuf.DurationR\x11heartbeatInterval\x12\x39\n\nexpires_at\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\texpiresAt\x12\x31\n\x08metadata\x18\x06 \x01(\x0b\x32\x15.datacatalog.MetadataR\x08metadata\"\\\n\x1eGetOrExtendReservationResponse\x12:\n\x0breservation\x18\x01 \x01(\x0b\x32\x18.datacatalog.ReservationR\x0breservation\"y\n\x19ReleaseReservationRequest\x12\x41\n\x0ereservation_id\x18\x01 \x01(\x0b\x32\x1a.datacatalog.ReservationIDR\rreservationId\x12\x19\n\x08owner_id\x18\x02 \x01(\tR\x07ownerId\"\x1c\n\x1aReleaseReservationResponse\"\x8a\x01\n\x07\x44\x61taset\x12&\n\x02id\x18\x01 \x01(\x0b\x32\x16.datacatalog.DatasetIDR\x02id\x12\x31\n\x08metadata\x18\x02 \x01(\x0b\x32\x15.datacatalog.MetadataR\x08metadata\x12$\n\rpartitionKeys\x18\x03 \x03(\tR\rpartitionKeys\"3\n\tPartition\x12\x10\n\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n\x05value\x18\x02 \x01(\tR\x05value\"\x91\x01\n\tDatasetID\x12\x18\n\x07project\x18\x01 \x01(\tR\x07project\x12\x12\n\x04name\x18\x02 \x01(\tR\x04name\x12\x16\n\x06\x64omain\x18\x03 \x01(\tR\x06\x64omain\x12\x18\n\x07version\x18\x04 \x01(\tR\x07version\x12\x12\n\x04UUID\x18\x05 \x01(\tR\x04UUID\x12\x10\n\x03org\x18\x06 \x01(\tR\x03org\"\xc7\x02\n\x08\x41rtifact\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x30\n\x07\x64\x61taset\x18\x02 \x01(\x0b\x32\x16.datacatalog.DatasetIDR\x07\x64\x61taset\x12-\n\x04\x64\x61ta\x18\x03 \x03(\x0b\x32\x19.datacatalog.ArtifactDataR\x04\x64\x61ta\x12\x31\n\x08metadata\x18\x04 \x01(\x0b\x32\x15.datacatalog.MetadataR\x08metadata\x12\x36\n\npartitions\x18\x05 \x03(\x0b\x32\x16.datacatalog.PartitionR\npartitions\x12$\n\x04tags\x18\x06 \x03(\x0b\x32\x10.datacatalog.TagR\x04tags\x12\x39\n\ncreated_at\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tcreatedAt\"P\n\x0c\x41rtifactData\x12\x12\n\x04name\x18\x01 \x01(\tR\x04name\x12,\n\x05value\x18\x02 \x01(\x0b\x32\x16.flyteidl.core.LiteralR\x05value\"l\n\x03Tag\x12\x12\n\x04name\x18\x01 \x01(\tR\x04name\x12\x1f\n\x0b\x61rtifact_id\x18\x02 \x01(\tR\nartifactId\x12\x30\n\x07\x64\x61taset\x18\x03 \x01(\x0b\x32\x16.datacatalog.DatasetIDR\x07\x64\x61taset\"\x81\x01\n\x08Metadata\x12:\n\x07key_map\x18\x01 \x03(\x0b\x32!.datacatalog.Metadata.KeyMapEntryR\x06keyMap\x1a\x39\n\x0bKeyMapEntry\x12\x10\n\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n\x05value\x18\x02 \x01(\tR\x05value:\x02\x38\x01\"O\n\x10\x46ilterExpression\x12;\n\x07\x66ilters\x18\x01 \x03(\x0b\x32!.datacatalog.SinglePropertyFilterR\x07\x66ilters\"\xce\x03\n\x14SinglePropertyFilter\x12?\n\ntag_filter\x18\x01 \x01(\x0b\x32\x1e.datacatalog.TagPropertyFilterH\x00R\ttagFilter\x12Q\n\x10partition_filter\x18\x02 \x01(\x0b\x32$.datacatalog.PartitionPropertyFilterH\x00R\x0fpartitionFilter\x12N\n\x0f\x61rtifact_filter\x18\x03 \x01(\x0b\x32#.datacatalog.ArtifactPropertyFilterH\x00R\x0e\x61rtifactFilter\x12K\n\x0e\x64\x61taset_filter\x18\x04 \x01(\x0b\x32\".datacatalog.DatasetPropertyFilterH\x00R\rdatasetFilter\x12P\n\x08operator\x18\n \x01(\x0e\x32\x34.datacatalog.SinglePropertyFilter.ComparisonOperatorR\x08operator\" \n\x12\x43omparisonOperator\x12\n\n\x06\x45QUALS\x10\x00\x42\x11\n\x0fproperty_filter\"G\n\x16\x41rtifactPropertyFilter\x12!\n\x0b\x61rtifact_id\x18\x01 \x01(\tH\x00R\nartifactIdB\n\n\x08property\"<\n\x11TagPropertyFilter\x12\x1b\n\x08tag_name\x18\x01 \x01(\tH\x00R\x07tagNameB\n\n\x08property\"[\n\x17PartitionPropertyFilter\x12\x34\n\x07key_val\x18\x01 \x01(\x0b\x32\x19.datacatalog.KeyValuePairH\x00R\x06keyValB\n\n\x08property\"6\n\x0cKeyValuePair\x12\x10\n\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n\x05value\x18\x02 \x01(\tR\x05value\"\x9f\x01\n\x15\x44\x61tasetPropertyFilter\x12\x1a\n\x07project\x18\x01 \x01(\tH\x00R\x07project\x12\x14\n\x04name\x18\x02 \x01(\tH\x00R\x04name\x12\x18\n\x06\x64omain\x18\x03 \x01(\tH\x00R\x06\x64omain\x12\x1a\n\x07version\x18\x04 \x01(\tH\x00R\x07version\x12\x12\n\x03org\x18\x05 \x01(\tH\x00R\x03orgB\n\n\x08property\"\x93\x02\n\x11PaginationOptions\x12\x14\n\x05limit\x18\x01 \x01(\rR\x05limit\x12\x14\n\x05token\x18\x02 \x01(\tR\x05token\x12@\n\x07sortKey\x18\x03 \x01(\x0e\x32&.datacatalog.PaginationOptions.SortKeyR\x07sortKey\x12\x46\n\tsortOrder\x18\x04 \x01(\x0e\x32(.datacatalog.PaginationOptions.SortOrderR\tsortOrder\"*\n\tSortOrder\x12\x0e\n\nDESCENDING\x10\x00\x12\r\n\tASCENDING\x10\x01\"\x1c\n\x07SortKey\x12\x11\n\rCREATION_TIME\x10\x00\x32\x86\x07\n\x0b\x44\x61taCatalog\x12V\n\rCreateDataset\x12!.datacatalog.CreateDatasetRequest\x1a\".datacatalog.CreateDatasetResponse\x12M\n\nGetDataset\x12\x1e.datacatalog.GetDatasetRequest\x1a\x1f.datacatalog.GetDatasetResponse\x12Y\n\x0e\x43reateArtifact\x12\".datacatalog.CreateArtifactRequest\x1a#.datacatalog.CreateArtifactResponse\x12P\n\x0bGetArtifact\x12\x1f.datacatalog.GetArtifactRequest\x1a .datacatalog.GetArtifactResponse\x12\x41\n\x06\x41\x64\x64Tag\x12\x1a.datacatalog.AddTagRequest\x1a\x1b.datacatalog.AddTagResponse\x12V\n\rListArtifacts\x12!.datacatalog.ListArtifactsRequest\x1a\".datacatalog.ListArtifactsResponse\x12S\n\x0cListDatasets\x12 .datacatalog.ListDatasetsRequest\x1a!.datacatalog.ListDatasetsResponse\x12Y\n\x0eUpdateArtifact\x12\".datacatalog.UpdateArtifactRequest\x1a#.datacatalog.UpdateArtifactResponse\x12q\n\x16GetOrExtendReservation\x12*.datacatalog.GetOrExtendReservationRequest\x1a+.datacatalog.GetOrExtendReservationResponse\x12\x65\n\x12ReleaseReservation\x12&.datacatalog.ReleaseReservationRequest\x1a\'.datacatalog.ReleaseReservationResponseB\xb2\x01\n\x0f\x63om.datacatalogB\x10\x44\x61tacatalogProtoP\x01ZAgithub.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/datacatalog\xa2\x02\x03\x44XX\xaa\x02\x0b\x44\x61tacatalog\xca\x02\x0b\x44\x61tacatalog\xe2\x02\x17\x44\x61tacatalog\\GPBMetadata\xea\x02\x0b\x44\x61tacatalogb\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n&flyteidl/datacatalog/datacatalog.proto\x12\x0b\x64\x61tacatalog\x1a\x1c\x66lyteidl/core/literals.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"F\n\x14\x43reateDatasetRequest\x12.\n\x07\x64\x61taset\x18\x01 \x01(\x0b\x32\x14.datacatalog.DatasetR\x07\x64\x61taset\"\x17\n\x15\x43reateDatasetResponse\"E\n\x11GetDatasetRequest\x12\x30\n\x07\x64\x61taset\x18\x01 \x01(\x0b\x32\x16.datacatalog.DatasetIDR\x07\x64\x61taset\"D\n\x12GetDatasetResponse\x12.\n\x07\x64\x61taset\x18\x01 \x01(\x0b\x32\x14.datacatalog.DatasetR\x07\x64\x61taset\"\x96\x01\n\x12GetArtifactRequest\x12\x30\n\x07\x64\x61taset\x18\x01 \x01(\x0b\x32\x16.datacatalog.DatasetIDR\x07\x64\x61taset\x12!\n\x0b\x61rtifact_id\x18\x02 \x01(\tH\x00R\nartifactId\x12\x1b\n\x08tag_name\x18\x03 \x01(\tH\x00R\x07tagNameB\x0e\n\x0cquery_handle\"H\n\x13GetArtifactResponse\x12\x31\n\x08\x61rtifact\x18\x01 \x01(\x0b\x32\x15.datacatalog.ArtifactR\x08\x61rtifact\"J\n\x15\x43reateArtifactRequest\x12\x31\n\x08\x61rtifact\x18\x01 \x01(\x0b\x32\x15.datacatalog.ArtifactR\x08\x61rtifact\"\x18\n\x16\x43reateArtifactResponse\"3\n\rAddTagRequest\x12\"\n\x03tag\x18\x01 \x01(\x0b\x32\x10.datacatalog.TagR\x03tag\"\x10\n\x0e\x41\x64\x64TagResponse\"\xbf\x01\n\x14ListArtifactsRequest\x12\x30\n\x07\x64\x61taset\x18\x01 \x01(\x0b\x32\x16.datacatalog.DatasetIDR\x07\x64\x61taset\x12\x35\n\x06\x66ilter\x18\x02 \x01(\x0b\x32\x1d.datacatalog.FilterExpressionR\x06\x66ilter\x12>\n\npagination\x18\x03 \x01(\x0b\x32\x1e.datacatalog.PaginationOptionsR\npagination\"k\n\x15ListArtifactsResponse\x12\x33\n\tartifacts\x18\x01 \x03(\x0b\x32\x15.datacatalog.ArtifactR\tartifacts\x12\x1d\n\nnext_token\x18\x02 \x01(\tR\tnextToken\"\x8c\x01\n\x13ListDatasetsRequest\x12\x35\n\x06\x66ilter\x18\x01 \x01(\x0b\x32\x1d.datacatalog.FilterExpressionR\x06\x66ilter\x12>\n\npagination\x18\x02 \x01(\x0b\x32\x1e.datacatalog.PaginationOptionsR\npagination\"g\n\x14ListDatasetsResponse\x12\x30\n\x08\x64\x61tasets\x18\x01 \x03(\x0b\x32\x14.datacatalog.DatasetR\x08\x64\x61tasets\x12\x1d\n\nnext_token\x18\x02 \x01(\tR\tnextToken\"\xfb\x01\n\x15UpdateArtifactRequest\x12\x30\n\x07\x64\x61taset\x18\x01 \x01(\x0b\x32\x16.datacatalog.DatasetIDR\x07\x64\x61taset\x12!\n\x0b\x61rtifact_id\x18\x02 \x01(\tH\x00R\nartifactId\x12\x1b\n\x08tag_name\x18\x03 \x01(\tH\x00R\x07tagName\x12-\n\x04\x64\x61ta\x18\x04 \x03(\x0b\x32\x19.datacatalog.ArtifactDataR\x04\x64\x61ta\x12\x31\n\x08metadata\x18\x05 \x01(\x0b\x32\x15.datacatalog.MetadataR\x08metadataB\x0e\n\x0cquery_handle\"9\n\x16UpdateArtifactResponse\x12\x1f\n\x0b\x61rtifact_id\x18\x01 \x01(\tR\nartifactId\"\x99\x01\n\x15\x44\x65leteArtifactRequest\x12\x30\n\x07\x64\x61taset\x18\x01 \x01(\x0b\x32\x16.datacatalog.DatasetIDR\x07\x64\x61taset\x12!\n\x0b\x61rtifact_id\x18\x02 \x01(\tH\x00R\nartifactId\x12\x1b\n\x08tag_name\x18\x03 \x01(\tH\x00R\x07tagNameB\x0e\n\x0cquery_handle\"\x18\n\x16\x44\x65leteArtifactResponse\"a\n\rReservationID\x12\x35\n\ndataset_id\x18\x01 \x01(\x0b\x32\x16.datacatalog.DatasetIDR\tdatasetId\x12\x19\n\x08tag_name\x18\x02 \x01(\tR\x07tagName\"\xc7\x01\n\x1dGetOrExtendReservationRequest\x12\x41\n\x0ereservation_id\x18\x01 \x01(\x0b\x32\x1a.datacatalog.ReservationIDR\rreservationId\x12\x19\n\x08owner_id\x18\x02 \x01(\tR\x07ownerId\x12H\n\x12heartbeat_interval\x18\x03 \x01(\x0b\x32\x19.google.protobuf.DurationR\x11heartbeatInterval\"\xa3\x02\n\x0bReservation\x12\x41\n\x0ereservation_id\x18\x01 \x01(\x0b\x32\x1a.datacatalog.ReservationIDR\rreservationId\x12\x19\n\x08owner_id\x18\x02 \x01(\tR\x07ownerId\x12H\n\x12heartbeat_interval\x18\x03 \x01(\x0b\x32\x19.google.protobuf.DurationR\x11heartbeatInterval\x12\x39\n\nexpires_at\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\texpiresAt\x12\x31\n\x08metadata\x18\x06 \x01(\x0b\x32\x15.datacatalog.MetadataR\x08metadata\"\\\n\x1eGetOrExtendReservationResponse\x12:\n\x0breservation\x18\x01 \x01(\x0b\x32\x18.datacatalog.ReservationR\x0breservation\"y\n\x19ReleaseReservationRequest\x12\x41\n\x0ereservation_id\x18\x01 \x01(\x0b\x32\x1a.datacatalog.ReservationIDR\rreservationId\x12\x19\n\x08owner_id\x18\x02 \x01(\tR\x07ownerId\"\x1c\n\x1aReleaseReservationResponse\"\x8a\x01\n\x07\x44\x61taset\x12&\n\x02id\x18\x01 \x01(\x0b\x32\x16.datacatalog.DatasetIDR\x02id\x12\x31\n\x08metadata\x18\x02 \x01(\x0b\x32\x15.datacatalog.MetadataR\x08metadata\x12$\n\rpartitionKeys\x18\x03 \x03(\tR\rpartitionKeys\"3\n\tPartition\x12\x10\n\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n\x05value\x18\x02 \x01(\tR\x05value\"\x91\x01\n\tDatasetID\x12\x18\n\x07project\x18\x01 \x01(\tR\x07project\x12\x12\n\x04name\x18\x02 \x01(\tR\x04name\x12\x16\n\x06\x64omain\x18\x03 \x01(\tR\x06\x64omain\x12\x18\n\x07version\x18\x04 \x01(\tR\x07version\x12\x12\n\x04UUID\x18\x05 \x01(\tR\x04UUID\x12\x10\n\x03org\x18\x06 \x01(\tR\x03org\"\xc7\x02\n\x08\x41rtifact\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x30\n\x07\x64\x61taset\x18\x02 \x01(\x0b\x32\x16.datacatalog.DatasetIDR\x07\x64\x61taset\x12-\n\x04\x64\x61ta\x18\x03 \x03(\x0b\x32\x19.datacatalog.ArtifactDataR\x04\x64\x61ta\x12\x31\n\x08metadata\x18\x04 \x01(\x0b\x32\x15.datacatalog.MetadataR\x08metadata\x12\x36\n\npartitions\x18\x05 \x03(\x0b\x32\x16.datacatalog.PartitionR\npartitions\x12$\n\x04tags\x18\x06 \x03(\x0b\x32\x10.datacatalog.TagR\x04tags\x12\x39\n\ncreated_at\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tcreatedAt\"P\n\x0c\x41rtifactData\x12\x12\n\x04name\x18\x01 \x01(\tR\x04name\x12,\n\x05value\x18\x02 \x01(\x0b\x32\x16.flyteidl.core.LiteralR\x05value\"l\n\x03Tag\x12\x12\n\x04name\x18\x01 \x01(\tR\x04name\x12\x1f\n\x0b\x61rtifact_id\x18\x02 \x01(\tR\nartifactId\x12\x30\n\x07\x64\x61taset\x18\x03 \x01(\x0b\x32\x16.datacatalog.DatasetIDR\x07\x64\x61taset\"\x81\x01\n\x08Metadata\x12:\n\x07key_map\x18\x01 \x03(\x0b\x32!.datacatalog.Metadata.KeyMapEntryR\x06keyMap\x1a\x39\n\x0bKeyMapEntry\x12\x10\n\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n\x05value\x18\x02 \x01(\tR\x05value:\x02\x38\x01\"O\n\x10\x46ilterExpression\x12;\n\x07\x66ilters\x18\x01 \x03(\x0b\x32!.datacatalog.SinglePropertyFilterR\x07\x66ilters\"\xce\x03\n\x14SinglePropertyFilter\x12?\n\ntag_filter\x18\x01 \x01(\x0b\x32\x1e.datacatalog.TagPropertyFilterH\x00R\ttagFilter\x12Q\n\x10partition_filter\x18\x02 \x01(\x0b\x32$.datacatalog.PartitionPropertyFilterH\x00R\x0fpartitionFilter\x12N\n\x0f\x61rtifact_filter\x18\x03 \x01(\x0b\x32#.datacatalog.ArtifactPropertyFilterH\x00R\x0e\x61rtifactFilter\x12K\n\x0e\x64\x61taset_filter\x18\x04 \x01(\x0b\x32\".datacatalog.DatasetPropertyFilterH\x00R\rdatasetFilter\x12P\n\x08operator\x18\n \x01(\x0e\x32\x34.datacatalog.SinglePropertyFilter.ComparisonOperatorR\x08operator\" \n\x12\x43omparisonOperator\x12\n\n\x06\x45QUALS\x10\x00\x42\x11\n\x0fproperty_filter\"G\n\x16\x41rtifactPropertyFilter\x12!\n\x0b\x61rtifact_id\x18\x01 \x01(\tH\x00R\nartifactIdB\n\n\x08property\"<\n\x11TagPropertyFilter\x12\x1b\n\x08tag_name\x18\x01 \x01(\tH\x00R\x07tagNameB\n\n\x08property\"[\n\x17PartitionPropertyFilter\x12\x34\n\x07key_val\x18\x01 \x01(\x0b\x32\x19.datacatalog.KeyValuePairH\x00R\x06keyValB\n\n\x08property\"6\n\x0cKeyValuePair\x12\x10\n\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n\x05value\x18\x02 \x01(\tR\x05value\"\x9f\x01\n\x15\x44\x61tasetPropertyFilter\x12\x1a\n\x07project\x18\x01 \x01(\tH\x00R\x07project\x12\x14\n\x04name\x18\x02 \x01(\tH\x00R\x04name\x12\x18\n\x06\x64omain\x18\x03 \x01(\tH\x00R\x06\x64omain\x12\x1a\n\x07version\x18\x04 \x01(\tH\x00R\x07version\x12\x12\n\x03org\x18\x05 \x01(\tH\x00R\x03orgB\n\n\x08property\"\x93\x02\n\x11PaginationOptions\x12\x14\n\x05limit\x18\x01 \x01(\rR\x05limit\x12\x14\n\x05token\x18\x02 \x01(\tR\x05token\x12@\n\x07sortKey\x18\x03 \x01(\x0e\x32&.datacatalog.PaginationOptions.SortKeyR\x07sortKey\x12\x46\n\tsortOrder\x18\x04 \x01(\x0e\x32(.datacatalog.PaginationOptions.SortOrderR\tsortOrder\"*\n\tSortOrder\x12\x0e\n\nDESCENDING\x10\x00\x12\r\n\tASCENDING\x10\x01\"\x1c\n\x07SortKey\x12\x11\n\rCREATION_TIME\x10\x00\x32\xe1\x07\n\x0b\x44\x61taCatalog\x12V\n\rCreateDataset\x12!.datacatalog.CreateDatasetRequest\x1a\".datacatalog.CreateDatasetResponse\x12M\n\nGetDataset\x12\x1e.datacatalog.GetDatasetRequest\x1a\x1f.datacatalog.GetDatasetResponse\x12Y\n\x0e\x43reateArtifact\x12\".datacatalog.CreateArtifactRequest\x1a#.datacatalog.CreateArtifactResponse\x12P\n\x0bGetArtifact\x12\x1f.datacatalog.GetArtifactRequest\x1a .datacatalog.GetArtifactResponse\x12\x41\n\x06\x41\x64\x64Tag\x12\x1a.datacatalog.AddTagRequest\x1a\x1b.datacatalog.AddTagResponse\x12V\n\rListArtifacts\x12!.datacatalog.ListArtifactsRequest\x1a\".datacatalog.ListArtifactsResponse\x12S\n\x0cListDatasets\x12 .datacatalog.ListDatasetsRequest\x1a!.datacatalog.ListDatasetsResponse\x12Y\n\x0eUpdateArtifact\x12\".datacatalog.UpdateArtifactRequest\x1a#.datacatalog.UpdateArtifactResponse\x12Y\n\x0e\x44\x65leteArtifact\x12\".datacatalog.DeleteArtifactRequest\x1a#.datacatalog.DeleteArtifactResponse\x12q\n\x16GetOrExtendReservation\x12*.datacatalog.GetOrExtendReservationRequest\x1a+.datacatalog.GetOrExtendReservationResponse\x12\x65\n\x12ReleaseReservation\x12&.datacatalog.ReleaseReservationRequest\x1a\'.datacatalog.ReleaseReservationResponseB\xb2\x01\n\x0f\x63om.datacatalogB\x10\x44\x61tacatalogProtoP\x01ZAgithub.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/datacatalog\xa2\x02\x03\x44XX\xaa\x02\x0b\x44\x61tacatalog\xca\x02\x0b\x44\x61tacatalog\xe2\x02\x17\x44\x61tacatalog\\GPBMetadata\xea\x02\x0b\x44\x61tacatalogb\x06proto3') _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) @@ -59,56 +59,60 @@ _globals['_UPDATEARTIFACTREQUEST']._serialized_end=1591 _globals['_UPDATEARTIFACTRESPONSE']._serialized_start=1593 _globals['_UPDATEARTIFACTRESPONSE']._serialized_end=1650 - _globals['_RESERVATIONID']._serialized_start=1652 - _globals['_RESERVATIONID']._serialized_end=1749 - _globals['_GETOREXTENDRESERVATIONREQUEST']._serialized_start=1752 - _globals['_GETOREXTENDRESERVATIONREQUEST']._serialized_end=1951 - _globals['_RESERVATION']._serialized_start=1954 - _globals['_RESERVATION']._serialized_end=2245 - _globals['_GETOREXTENDRESERVATIONRESPONSE']._serialized_start=2247 - _globals['_GETOREXTENDRESERVATIONRESPONSE']._serialized_end=2339 - _globals['_RELEASERESERVATIONREQUEST']._serialized_start=2341 - _globals['_RELEASERESERVATIONREQUEST']._serialized_end=2462 - _globals['_RELEASERESERVATIONRESPONSE']._serialized_start=2464 - _globals['_RELEASERESERVATIONRESPONSE']._serialized_end=2492 - _globals['_DATASET']._serialized_start=2495 - _globals['_DATASET']._serialized_end=2633 - _globals['_PARTITION']._serialized_start=2635 - _globals['_PARTITION']._serialized_end=2686 - _globals['_DATASETID']._serialized_start=2689 - _globals['_DATASETID']._serialized_end=2834 - _globals['_ARTIFACT']._serialized_start=2837 - _globals['_ARTIFACT']._serialized_end=3164 - _globals['_ARTIFACTDATA']._serialized_start=3166 - _globals['_ARTIFACTDATA']._serialized_end=3246 - _globals['_TAG']._serialized_start=3248 - _globals['_TAG']._serialized_end=3356 - _globals['_METADATA']._serialized_start=3359 - _globals['_METADATA']._serialized_end=3488 - _globals['_METADATA_KEYMAPENTRY']._serialized_start=3431 - _globals['_METADATA_KEYMAPENTRY']._serialized_end=3488 - _globals['_FILTEREXPRESSION']._serialized_start=3490 - _globals['_FILTEREXPRESSION']._serialized_end=3569 - _globals['_SINGLEPROPERTYFILTER']._serialized_start=3572 - _globals['_SINGLEPROPERTYFILTER']._serialized_end=4034 - _globals['_SINGLEPROPERTYFILTER_COMPARISONOPERATOR']._serialized_start=3983 - _globals['_SINGLEPROPERTYFILTER_COMPARISONOPERATOR']._serialized_end=4015 - _globals['_ARTIFACTPROPERTYFILTER']._serialized_start=4036 - _globals['_ARTIFACTPROPERTYFILTER']._serialized_end=4107 - _globals['_TAGPROPERTYFILTER']._serialized_start=4109 - _globals['_TAGPROPERTYFILTER']._serialized_end=4169 - _globals['_PARTITIONPROPERTYFILTER']._serialized_start=4171 - _globals['_PARTITIONPROPERTYFILTER']._serialized_end=4262 - _globals['_KEYVALUEPAIR']._serialized_start=4264 - _globals['_KEYVALUEPAIR']._serialized_end=4318 - _globals['_DATASETPROPERTYFILTER']._serialized_start=4321 - _globals['_DATASETPROPERTYFILTER']._serialized_end=4480 - _globals['_PAGINATIONOPTIONS']._serialized_start=4483 - _globals['_PAGINATIONOPTIONS']._serialized_end=4758 - _globals['_PAGINATIONOPTIONS_SORTORDER']._serialized_start=4686 - _globals['_PAGINATIONOPTIONS_SORTORDER']._serialized_end=4728 - _globals['_PAGINATIONOPTIONS_SORTKEY']._serialized_start=4730 - _globals['_PAGINATIONOPTIONS_SORTKEY']._serialized_end=4758 - _globals['_DATACATALOG']._serialized_start=4761 - _globals['_DATACATALOG']._serialized_end=5663 + _globals['_DELETEARTIFACTREQUEST']._serialized_start=1653 + _globals['_DELETEARTIFACTREQUEST']._serialized_end=1806 + _globals['_DELETEARTIFACTRESPONSE']._serialized_start=1808 + _globals['_DELETEARTIFACTRESPONSE']._serialized_end=1832 + _globals['_RESERVATIONID']._serialized_start=1834 + _globals['_RESERVATIONID']._serialized_end=1931 + _globals['_GETOREXTENDRESERVATIONREQUEST']._serialized_start=1934 + _globals['_GETOREXTENDRESERVATIONREQUEST']._serialized_end=2133 + _globals['_RESERVATION']._serialized_start=2136 + _globals['_RESERVATION']._serialized_end=2427 + _globals['_GETOREXTENDRESERVATIONRESPONSE']._serialized_start=2429 + _globals['_GETOREXTENDRESERVATIONRESPONSE']._serialized_end=2521 + _globals['_RELEASERESERVATIONREQUEST']._serialized_start=2523 + _globals['_RELEASERESERVATIONREQUEST']._serialized_end=2644 + _globals['_RELEASERESERVATIONRESPONSE']._serialized_start=2646 + _globals['_RELEASERESERVATIONRESPONSE']._serialized_end=2674 + _globals['_DATASET']._serialized_start=2677 + _globals['_DATASET']._serialized_end=2815 + _globals['_PARTITION']._serialized_start=2817 + _globals['_PARTITION']._serialized_end=2868 + _globals['_DATASETID']._serialized_start=2871 + _globals['_DATASETID']._serialized_end=3016 + _globals['_ARTIFACT']._serialized_start=3019 + _globals['_ARTIFACT']._serialized_end=3346 + _globals['_ARTIFACTDATA']._serialized_start=3348 + _globals['_ARTIFACTDATA']._serialized_end=3428 + _globals['_TAG']._serialized_start=3430 + _globals['_TAG']._serialized_end=3538 + _globals['_METADATA']._serialized_start=3541 + _globals['_METADATA']._serialized_end=3670 + _globals['_METADATA_KEYMAPENTRY']._serialized_start=3613 + _globals['_METADATA_KEYMAPENTRY']._serialized_end=3670 + _globals['_FILTEREXPRESSION']._serialized_start=3672 + _globals['_FILTEREXPRESSION']._serialized_end=3751 + _globals['_SINGLEPROPERTYFILTER']._serialized_start=3754 + _globals['_SINGLEPROPERTYFILTER']._serialized_end=4216 + _globals['_SINGLEPROPERTYFILTER_COMPARISONOPERATOR']._serialized_start=4165 + _globals['_SINGLEPROPERTYFILTER_COMPARISONOPERATOR']._serialized_end=4197 + _globals['_ARTIFACTPROPERTYFILTER']._serialized_start=4218 + _globals['_ARTIFACTPROPERTYFILTER']._serialized_end=4289 + _globals['_TAGPROPERTYFILTER']._serialized_start=4291 + _globals['_TAGPROPERTYFILTER']._serialized_end=4351 + _globals['_PARTITIONPROPERTYFILTER']._serialized_start=4353 + _globals['_PARTITIONPROPERTYFILTER']._serialized_end=4444 + _globals['_KEYVALUEPAIR']._serialized_start=4446 + _globals['_KEYVALUEPAIR']._serialized_end=4500 + _globals['_DATASETPROPERTYFILTER']._serialized_start=4503 + _globals['_DATASETPROPERTYFILTER']._serialized_end=4662 + _globals['_PAGINATIONOPTIONS']._serialized_start=4665 + _globals['_PAGINATIONOPTIONS']._serialized_end=4940 + _globals['_PAGINATIONOPTIONS_SORTORDER']._serialized_start=4868 + _globals['_PAGINATIONOPTIONS_SORTORDER']._serialized_end=4910 + _globals['_PAGINATIONOPTIONS_SORTKEY']._serialized_start=4912 + _globals['_PAGINATIONOPTIONS_SORTKEY']._serialized_end=4940 + _globals['_DATACATALOG']._serialized_start=4943 + _globals['_DATACATALOG']._serialized_end=5936 # @@protoc_insertion_point(module_scope) diff --git a/flyteidl/gen/pb_python/flyteidl/datacatalog/datacatalog_pb2.pyi b/flyteidl/gen/pb_python/flyteidl/datacatalog/datacatalog_pb2.pyi index 22dd8edbfe..7c6ea81921 100644 --- a/flyteidl/gen/pb_python/flyteidl/datacatalog/datacatalog_pb2.pyi +++ b/flyteidl/gen/pb_python/flyteidl/datacatalog/datacatalog_pb2.pyi @@ -121,6 +121,20 @@ class UpdateArtifactResponse(_message.Message): artifact_id: str def __init__(self, artifact_id: _Optional[str] = ...) -> None: ... +class DeleteArtifactRequest(_message.Message): + __slots__ = ["dataset", "artifact_id", "tag_name"] + DATASET_FIELD_NUMBER: _ClassVar[int] + ARTIFACT_ID_FIELD_NUMBER: _ClassVar[int] + TAG_NAME_FIELD_NUMBER: _ClassVar[int] + dataset: DatasetID + artifact_id: str + tag_name: str + def __init__(self, dataset: _Optional[_Union[DatasetID, _Mapping]] = ..., artifact_id: _Optional[str] = ..., tag_name: _Optional[str] = ...) -> None: ... + +class DeleteArtifactResponse(_message.Message): + __slots__ = [] + def __init__(self) -> None: ... + class ReservationID(_message.Message): __slots__ = ["dataset_id", "tag_name"] DATASET_ID_FIELD_NUMBER: _ClassVar[int] diff --git a/flyteidl/gen/pb_python/flyteidl/datacatalog/datacatalog_pb2_grpc.py b/flyteidl/gen/pb_python/flyteidl/datacatalog/datacatalog_pb2_grpc.py index b78b2fa78b..fe4158c7bb 100644 --- a/flyteidl/gen/pb_python/flyteidl/datacatalog/datacatalog_pb2_grpc.py +++ b/flyteidl/gen/pb_python/flyteidl/datacatalog/datacatalog_pb2_grpc.py @@ -58,6 +58,11 @@ def __init__(self, channel): request_serializer=flyteidl_dot_datacatalog_dot_datacatalog__pb2.UpdateArtifactRequest.SerializeToString, response_deserializer=flyteidl_dot_datacatalog_dot_datacatalog__pb2.UpdateArtifactResponse.FromString, ) + self.DeleteArtifact = channel.unary_unary( + '/datacatalog.DataCatalog/DeleteArtifact', + request_serializer=flyteidl_dot_datacatalog_dot_datacatalog__pb2.DeleteArtifactRequest.SerializeToString, + response_deserializer=flyteidl_dot_datacatalog_dot_datacatalog__pb2.DeleteArtifactResponse.FromString, + ) self.GetOrExtendReservation = channel.unary_unary( '/datacatalog.DataCatalog/GetOrExtendReservation', request_serializer=flyteidl_dot_datacatalog_dot_datacatalog__pb2.GetOrExtendReservationRequest.SerializeToString, @@ -135,6 +140,13 @@ def UpdateArtifact(self, request, context): context.set_details('Method not implemented!') raise NotImplementedError('Method not implemented!') + def DeleteArtifact(self, request, context): + """Deletes an existing artifact, removing the stored artifact data from the underlying blob storage. + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + def GetOrExtendReservation(self, request, context): """Attempts to get or extend a reservation for the corresponding artifact. If one already exists (ie. another entity owns the reservation) then that reservation is retrieved. @@ -203,6 +215,11 @@ def add_DataCatalogServicer_to_server(servicer, server): request_deserializer=flyteidl_dot_datacatalog_dot_datacatalog__pb2.UpdateArtifactRequest.FromString, response_serializer=flyteidl_dot_datacatalog_dot_datacatalog__pb2.UpdateArtifactResponse.SerializeToString, ), + 'DeleteArtifact': grpc.unary_unary_rpc_method_handler( + servicer.DeleteArtifact, + request_deserializer=flyteidl_dot_datacatalog_dot_datacatalog__pb2.DeleteArtifactRequest.FromString, + response_serializer=flyteidl_dot_datacatalog_dot_datacatalog__pb2.DeleteArtifactResponse.SerializeToString, + ), 'GetOrExtendReservation': grpc.unary_unary_rpc_method_handler( servicer.GetOrExtendReservation, request_deserializer=flyteidl_dot_datacatalog_dot_datacatalog__pb2.GetOrExtendReservationRequest.FromString, @@ -363,6 +380,23 @@ def UpdateArtifact(request, options, channel_credentials, insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + @staticmethod + def DeleteArtifact(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/datacatalog.DataCatalog/DeleteArtifact', + flyteidl_dot_datacatalog_dot_datacatalog__pb2.DeleteArtifactRequest.SerializeToString, + flyteidl_dot_datacatalog_dot_datacatalog__pb2.DeleteArtifactResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + @staticmethod def GetOrExtendReservation(request, target, diff --git a/flyteidl/gen/pb_python/flyteidl/service/cache_pb2.py b/flyteidl/gen/pb_python/flyteidl/service/cache_pb2.py new file mode 100644 index 0000000000..47d1b3399a --- /dev/null +++ b/flyteidl/gen/pb_python/flyteidl/service/cache_pb2.py @@ -0,0 +1,36 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: flyteidl/service/cache.proto +"""Generated protocol buffer code.""" +from google.protobuf.internal import builder as _builder +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import symbol_database as _symbol_database +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + +from google.api import annotations_pb2 as google_dot_api_dot_annotations__pb2 +from flyteidl.core import errors_pb2 as flyteidl_dot_core_dot_errors__pb2 +from flyteidl.core import identifier_pb2 as flyteidl_dot_core_dot_identifier__pb2 + + +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1c\x66lyteidl/service/cache.proto\x12\x10\x66lyteidl.service\x1a\x1cgoogle/api/annotations.proto\x1a\x1a\x66lyteidl/core/errors.proto\x1a\x1e\x66lyteidl/core/identifier.proto\"t\n\x1e\x45victTaskExecutionCacheRequest\x12R\n\x11task_execution_id\x18\x01 \x01(\x0b\x32&.flyteidl.core.TaskExecutionIdentifierR\x0ftaskExecutionId\"S\n\x12\x45victCacheResponse\x12=\n\x06\x65rrors\x18\x01 \x01(\x0b\x32%.flyteidl.core.CacheEvictionErrorListR\x06\x65rrors2\xb5\x04\n\x0c\x43\x61\x63heService\x12\xa4\x04\n\x17\x45victTaskExecutionCache\x12\x30.flyteidl.service.EvictTaskExecutionCacheRequest\x1a$.flyteidl.service.EvictCacheResponse\"\xb0\x03\x82\xd3\xe4\x93\x02\xa9\x03*\xa6\x03/api/v1/cache/task_executions/{task_execution_id.node_execution_id.execution_id.project}/{task_execution_id.node_execution_id.execution_id.domain}/{task_execution_id.node_execution_id.execution_id.name}/{task_execution_id.node_execution_id.node_id}/{task_execution_id.task_id.project}/{task_execution_id.task_id.domain}/{task_execution_id.task_id.name}/{task_execution_id.task_id.version}/{task_execution_id.retry_attempt}B\xc2\x01\n\x14\x63om.flyteidl.serviceB\nCacheProtoP\x01Z=github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/service\xa2\x02\x03\x46SX\xaa\x02\x10\x46lyteidl.Service\xca\x02\x10\x46lyteidl\\Service\xe2\x02\x1c\x46lyteidl\\Service\\GPBMetadata\xea\x02\x11\x46lyteidl::Serviceb\x06proto3') + +_globals = globals() +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'flyteidl.service.cache_pb2', _globals) +if _descriptor._USE_C_DESCRIPTORS == False: + + DESCRIPTOR._options = None + DESCRIPTOR._serialized_options = b'\n\024com.flyteidl.serviceB\nCacheProtoP\001Z=github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/service\242\002\003FSX\252\002\020Flyteidl.Service\312\002\020Flyteidl\\Service\342\002\034Flyteidl\\Service\\GPBMetadata\352\002\021Flyteidl::Service' + _CACHESERVICE.methods_by_name['EvictTaskExecutionCache']._options = None + _CACHESERVICE.methods_by_name['EvictTaskExecutionCache']._serialized_options = b'\202\323\344\223\002\251\003*\246\003/api/v1/cache/task_executions/{task_execution_id.node_execution_id.execution_id.project}/{task_execution_id.node_execution_id.execution_id.domain}/{task_execution_id.node_execution_id.execution_id.name}/{task_execution_id.node_execution_id.node_id}/{task_execution_id.task_id.project}/{task_execution_id.task_id.domain}/{task_execution_id.task_id.name}/{task_execution_id.task_id.version}/{task_execution_id.retry_attempt}' + _globals['_EVICTTASKEXECUTIONCACHEREQUEST']._serialized_start=140 + _globals['_EVICTTASKEXECUTIONCACHEREQUEST']._serialized_end=256 + _globals['_EVICTCACHERESPONSE']._serialized_start=258 + _globals['_EVICTCACHERESPONSE']._serialized_end=341 + _globals['_CACHESERVICE']._serialized_start=344 + _globals['_CACHESERVICE']._serialized_end=909 +# @@protoc_insertion_point(module_scope) diff --git a/flyteidl/gen/pb_python/flyteidl/service/cache_pb2.pyi b/flyteidl/gen/pb_python/flyteidl/service/cache_pb2.pyi new file mode 100644 index 0000000000..26472fa38d --- /dev/null +++ b/flyteidl/gen/pb_python/flyteidl/service/cache_pb2.pyi @@ -0,0 +1,20 @@ +from google.api import annotations_pb2 as _annotations_pb2 +from flyteidl.core import errors_pb2 as _errors_pb2 +from flyteidl.core import identifier_pb2 as _identifier_pb2 +from google.protobuf import descriptor as _descriptor +from google.protobuf import message as _message +from typing import ClassVar as _ClassVar, Mapping as _Mapping, Optional as _Optional, Union as _Union + +DESCRIPTOR: _descriptor.FileDescriptor + +class EvictTaskExecutionCacheRequest(_message.Message): + __slots__ = ["task_execution_id"] + TASK_EXECUTION_ID_FIELD_NUMBER: _ClassVar[int] + task_execution_id: _identifier_pb2.TaskExecutionIdentifier + def __init__(self, task_execution_id: _Optional[_Union[_identifier_pb2.TaskExecutionIdentifier, _Mapping]] = ...) -> None: ... + +class EvictCacheResponse(_message.Message): + __slots__ = ["errors"] + ERRORS_FIELD_NUMBER: _ClassVar[int] + errors: _errors_pb2.CacheEvictionErrorList + def __init__(self, errors: _Optional[_Union[_errors_pb2.CacheEvictionErrorList, _Mapping]] = ...) -> None: ... diff --git a/flyteidl/gen/pb_python/flyteidl/service/cache_pb2_grpc.py b/flyteidl/gen/pb_python/flyteidl/service/cache_pb2_grpc.py new file mode 100644 index 0000000000..86c189a675 --- /dev/null +++ b/flyteidl/gen/pb_python/flyteidl/service/cache_pb2_grpc.py @@ -0,0 +1,70 @@ +# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" +import grpc + +from flyteidl.service import cache_pb2 as flyteidl_dot_service_dot_cache__pb2 + + +class CacheServiceStub(object): + """CacheService defines an RPC Service for interacting with cached data in Flyte on a high level basis. + """ + + def __init__(self, channel): + """Constructor. + + Args: + channel: A grpc.Channel. + """ + self.EvictTaskExecutionCache = channel.unary_unary( + '/flyteidl.service.CacheService/EvictTaskExecutionCache', + request_serializer=flyteidl_dot_service_dot_cache__pb2.EvictTaskExecutionCacheRequest.SerializeToString, + response_deserializer=flyteidl_dot_service_dot_cache__pb2.EvictCacheResponse.FromString, + ) + + +class CacheServiceServicer(object): + """CacheService defines an RPC Service for interacting with cached data in Flyte on a high level basis. + """ + + def EvictTaskExecutionCache(self, request, context): + """Evicts all cached data for the referenced :ref:`ref_flyteidl.admin.TaskExecution`. + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + +def add_CacheServiceServicer_to_server(servicer, server): + rpc_method_handlers = { + 'EvictTaskExecutionCache': grpc.unary_unary_rpc_method_handler( + servicer.EvictTaskExecutionCache, + request_deserializer=flyteidl_dot_service_dot_cache__pb2.EvictTaskExecutionCacheRequest.FromString, + response_serializer=flyteidl_dot_service_dot_cache__pb2.EvictCacheResponse.SerializeToString, + ), + } + generic_handler = grpc.method_handlers_generic_handler( + 'flyteidl.service.CacheService', rpc_method_handlers) + server.add_generic_rpc_handlers((generic_handler,)) + + + # This class is part of an EXPERIMENTAL API. +class CacheService(object): + """CacheService defines an RPC Service for interacting with cached data in Flyte on a high level basis. + """ + + @staticmethod + def EvictTaskExecutionCache(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/flyteidl.service.CacheService/EvictTaskExecutionCache', + flyteidl_dot_service_dot_cache__pb2.EvictTaskExecutionCacheRequest.SerializeToString, + flyteidl_dot_service_dot_cache__pb2.EvictCacheResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) diff --git a/flyteidl/gen/pb_rust/datacatalog.rs b/flyteidl/gen/pb_rust/datacatalog.rs index ac2c695cab..cf56271fd6 100644 --- a/flyteidl/gen/pb_rust/datacatalog.rs +++ b/flyteidl/gen/pb_rust/datacatalog.rs @@ -179,6 +179,36 @@ pub struct UpdateArtifactResponse { pub artifact_id: ::prost::alloc::string::String, } /// +/// Request message for deleting an Artifact and its associated ArtifactData. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct DeleteArtifactRequest { + /// ID of dataset the artifact is associated with + #[prost(message, optional, tag="1")] + pub dataset: ::core::option::Option, + /// Either ID of artifact or name of tag of existing artifact + #[prost(oneof="delete_artifact_request::QueryHandle", tags="2, 3")] + pub query_handle: ::core::option::Option, +} +/// Nested message and enum types in `DeleteArtifactRequest`. +pub mod delete_artifact_request { + /// Either ID of artifact or name of tag of existing artifact + #[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum QueryHandle { + #[prost(string, tag="2")] + ArtifactId(::prost::alloc::string::String), + #[prost(string, tag="3")] + TagName(::prost::alloc::string::String), + } +} +/// +/// Response message for deleting an Artifact. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct DeleteArtifactResponse { +} +/// /// ReservationID message that is composed of several string fields. #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] diff --git a/flyteidl/gen/pb_rust/flyteidl.core.rs b/flyteidl/gen/pb_rust/flyteidl.core.rs index 280140c75d..7e7894735d 100644 --- a/flyteidl/gen/pb_rust/flyteidl.core.rs +++ b/flyteidl/gen/pb_rust/flyteidl.core.rs @@ -3017,6 +3017,85 @@ pub struct ErrorDocument { #[prost(message, optional, tag="1")] pub error: ::core::option::Option, } +/// Error returned if eviction of cached output fails and should be re-tried by the user. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct CacheEvictionError { + /// Error code to match type of cache eviction error encountered. + #[prost(enumeration="cache_eviction_error::Code", tag="1")] + pub code: i32, + /// More detailed error message explaining the reason for the cache eviction failure. + #[prost(string, tag="2")] + pub message: ::prost::alloc::string::String, + /// ID of the node execution the cache eviction failed for. + #[prost(message, optional, tag="3")] + pub node_execution_id: ::core::option::Option, + /// Source of the node execution. + #[prost(oneof="cache_eviction_error::Source", tags="4, 5")] + pub source: ::core::option::Option, +} +/// Nested message and enum types in `CacheEvictionError`. +pub mod cache_eviction_error { + /// Defines codes for distinguishing between errors encountered during cache eviction. + #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] + #[repr(i32)] + pub enum Code { + /// Indicates a generic internal error occurred. + Internal = 0, + /// Indicates no reservation could be acquired before deleting an artifact. + ReservationNotAcquired = 1, + /// Indicates updating the database entry related to the node execution failed. + DatabaseUpdateFailed = 2, + /// Indicates deleting the artifact from datacatalog failed. + ArtifactDeleteFailed = 3, + /// Indicates the reservation previously acquired could not be released for an artifact. + ReservationNotReleased = 4, + } + impl Code { + /// String value of the enum field names used in the ProtoBuf definition. + /// + /// The values are not transformed in any way and thus are considered stable + /// (if the ProtoBuf definition does not change) and safe for programmatic use. + pub fn as_str_name(&self) -> &'static str { + match self { + Code::Internal => "INTERNAL", + Code::ReservationNotAcquired => "RESERVATION_NOT_ACQUIRED", + Code::DatabaseUpdateFailed => "DATABASE_UPDATE_FAILED", + Code::ArtifactDeleteFailed => "ARTIFACT_DELETE_FAILED", + Code::ReservationNotReleased => "RESERVATION_NOT_RELEASED", + } + } + /// Creates an enum from field names used in the ProtoBuf definition. + pub fn from_str_name(value: &str) -> ::core::option::Option { + match value { + "INTERNAL" => Some(Self::Internal), + "RESERVATION_NOT_ACQUIRED" => Some(Self::ReservationNotAcquired), + "DATABASE_UPDATE_FAILED" => Some(Self::DatabaseUpdateFailed), + "ARTIFACT_DELETE_FAILED" => Some(Self::ArtifactDeleteFailed), + "RESERVATION_NOT_RELEASED" => Some(Self::ReservationNotReleased), + _ => None, + } + } + } + /// Source of the node execution. + #[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum Source { + /// ID of the task execution the cache eviction failed for (if the node execution was part of a task execution). + #[prost(message, tag="4")] + TaskExecutionId(super::TaskExecutionIdentifier), + /// ID of the workflow execution the cache eviction failed for (if the node execution was part of a workflow execution). + #[prost(message, tag="5")] + WorkflowExecutionId(super::WorkflowExecutionIdentifier), + } +} +/// List of :ref:`ref_flyteidl.core.CacheEvictionError` encountered during a cache eviction request. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct CacheEvictionErrorList { + #[prost(message, repeated, tag="1")] + pub errors: ::prost::alloc::vec::Vec, +} /// Defines an enclosed package of workflow and tasks it references. #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] diff --git a/flyteidl/gen/pb_rust/flyteidl.service.rs b/flyteidl/gen/pb_rust/flyteidl.service.rs index e53abba678..c8043f0038 100644 --- a/flyteidl/gen/pb_rust/flyteidl.service.rs +++ b/flyteidl/gen/pb_rust/flyteidl.service.rs @@ -75,6 +75,20 @@ pub struct PublicClientAuthConfigResponse { } #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] +pub struct EvictTaskExecutionCacheRequest { + /// Identifier of :ref:`ref_flyteidl.admin.TaskExecution` to evict cache for. + #[prost(message, optional, tag="1")] + pub task_execution_id: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct EvictCacheResponse { + /// List of errors encountered during cache eviction (if any). + #[prost(message, optional, tag="1")] + pub errors: ::core::option::Option, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] pub struct CreateUploadLocationResponse { /// SignedUrl specifies the url to use to upload content to (e.g. ) #[prost(string, tag="1")] diff --git a/flyteidl/go.mod b/flyteidl/go.mod index 2187b2aeab..72dcc4ce7e 100644 --- a/flyteidl/go.mod +++ b/flyteidl/go.mod @@ -8,7 +8,7 @@ require ( github.com/flyteorg/flyte/flytestdlib v0.0.0-00010101000000-000000000000 github.com/go-test/deep v1.0.7 github.com/golang/protobuf v1.5.3 - github.com/grpc-ecosystem/go-grpc-middleware v1.1.0 + github.com/grpc-ecosystem/go-grpc-middleware v1.3.0 github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0 github.com/grpc-ecosystem/grpc-gateway/v2 v2.7.0 github.com/jinzhu/copier v0.3.5 @@ -17,12 +17,12 @@ require ( github.com/pkg/errors v0.9.1 github.com/spf13/pflag v1.0.5 github.com/stretchr/testify v1.8.4 - golang.org/x/net v0.15.0 + golang.org/x/net v0.17.0 golang.org/x/oauth2 v0.8.0 google.golang.org/genproto/googleapis/api v0.0.0-20230525234035-dd9d682886f9 google.golang.org/grpc v1.56.1 google.golang.org/protobuf v1.30.0 - k8s.io/apimachinery v0.28.2 + k8s.io/apimachinery v0.28.3 ) require ( @@ -30,7 +30,7 @@ require ( cloud.google.com/go/compute v1.19.1 // indirect cloud.google.com/go/compute/metadata v0.2.3 // indirect cloud.google.com/go/iam v0.13.0 // indirect - cloud.google.com/go/storage v1.28.1 // indirect + cloud.google.com/go/storage v1.29.0 // indirect github.com/Azure/azure-sdk-for-go/sdk/azcore v1.7.2 // indirect github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.3.1 // indirect github.com/Azure/azure-sdk-for-go/sdk/internal v1.3.0 // indirect @@ -42,7 +42,7 @@ require ( github.com/cespare/xxhash/v2 v2.2.0 // indirect github.com/coocood/freecache v1.1.1 // indirect github.com/davecgh/go-spew v1.1.1 // indirect - github.com/emicklei/go-restful/v3 v3.9.0 // indirect + github.com/emicklei/go-restful/v3 v3.11.0 // indirect github.com/evanphx/json-patch/v5 v5.6.0 // indirect github.com/fatih/color v1.13.0 // indirect github.com/flyteorg/stow v0.3.10 // indirect @@ -68,7 +68,7 @@ require ( github.com/kylelemons/godebug v1.1.0 // indirect github.com/mailru/easyjson v0.7.7 // indirect github.com/mattn/go-colorable v0.1.12 // indirect - github.com/mattn/go-isatty v0.0.14 // indirect + github.com/mattn/go-isatty v0.0.16 // indirect github.com/matttproud/golang_protobuf_extensions v1.0.4 // indirect github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect github.com/modern-go/reflect2 v1.0.2 // indirect @@ -79,7 +79,7 @@ require ( github.com/prometheus/client_model v0.4.0 // indirect github.com/prometheus/common v0.44.0 // indirect github.com/prometheus/procfs v0.10.1 // indirect - github.com/sirupsen/logrus v1.7.0 // indirect + github.com/sirupsen/logrus v1.9.3 // indirect github.com/spf13/cobra v1.7.0 // indirect github.com/stretchr/objx v0.5.0 // indirect go.opencensus.io v0.24.0 // indirect @@ -89,10 +89,10 @@ require ( go.opentelemetry.io/otel/metric v1.19.0 // indirect go.opentelemetry.io/otel/sdk v1.19.0 // indirect go.opentelemetry.io/otel/trace v1.19.0 // indirect - golang.org/x/crypto v0.13.0 // indirect - golang.org/x/exp v0.0.0-20220722155223-a9213eeb770e // indirect - golang.org/x/sys v0.12.0 // indirect - golang.org/x/term v0.12.0 // indirect + golang.org/x/crypto v0.14.0 // indirect + golang.org/x/exp v0.0.0-20231005195138-3e424a577f31 // indirect + golang.org/x/sys v0.13.0 // indirect + golang.org/x/term v0.13.0 // indirect golang.org/x/text v0.13.0 // indirect golang.org/x/time v0.3.0 // indirect golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2 // indirect @@ -103,12 +103,12 @@ require ( gopkg.in/inf.v0 v0.9.1 // indirect gopkg.in/yaml.v2 v2.4.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect - k8s.io/api v0.28.2 // indirect - k8s.io/client-go v0.28.1 // indirect + k8s.io/api v0.28.3 // indirect + k8s.io/client-go v0.28.3 // indirect k8s.io/klog/v2 v2.100.1 // indirect k8s.io/kube-openapi v0.0.0-20230717233707-2695361300d9 // indirect k8s.io/utils v0.0.0-20230406110748-d93618cff8a2 // indirect - sigs.k8s.io/controller-runtime v0.0.0-00010101000000-000000000000 // indirect + sigs.k8s.io/controller-runtime v0.16.3 // indirect sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect sigs.k8s.io/structured-merge-diff/v4 v4.2.3 // indirect sigs.k8s.io/yaml v1.3.0 // indirect diff --git a/flyteidl/go.sum b/flyteidl/go.sum index 5b4cf356d3..8909f36209 100644 --- a/flyteidl/go.sum +++ b/flyteidl/go.sum @@ -40,8 +40,8 @@ cloud.google.com/go/storage v1.5.0/go.mod h1:tpKbwo567HUNpVclU5sGELwQWBDZ8gh0Zeo cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohlUTyfDhBk= cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs= cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0= -cloud.google.com/go/storage v1.28.1 h1:F5QDG5ChchaAVQhINh24U99OWHURqrW8OmQcGKXcbgI= -cloud.google.com/go/storage v1.28.1/go.mod h1:Qnisd4CqDdo6BGs2AD5LLnEsmSQ80wQ5ogcBBKhU86Y= +cloud.google.com/go/storage v1.29.0 h1:6weCgzRvMg7lzuUurI4697AqIRPU1SvzHhynwpW31jI= +cloud.google.com/go/storage v1.29.0/go.mod h1:4puEjyTKnku6gfKoTfNOU/W+a9JyuVNxjpS5GBrB8h4= dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= github.com/Azure/azure-sdk-for-go/sdk/azcore v1.7.2 h1:t5+QXLCK9SVi0PPdaY0PrFvYUo24KwA0QwxnaHRSVd4= github.com/Azure/azure-sdk-for-go/sdk/azcore v1.7.2/go.mod h1:bjGvMhVMb+EEm3VRNQawDMUyMMjo+S5ewNjflkep/0Q= @@ -92,8 +92,8 @@ 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/emicklei/go-restful/v3 v3.9.0 h1:XwGDlfxEnQZzuopoqxwSEllNcCOM9DhhFyhFIIGKwxE= -github.com/emicklei/go-restful/v3 v3.9.0/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRry+4bhvbpWn3mrbc= +github.com/emicklei/go-restful/v3 v3.11.0 h1:rAQeMHw1c7zTmncogyy8VvRZwtkmkZ4FxERmMY4rD+g= +github.com/emicklei/go-restful/v3 v3.11.0/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRry+4bhvbpWn3mrbc= github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= @@ -114,6 +114,8 @@ github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeME github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= +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 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.2.4 h1:g01GSCwiDw2xSZfjJ2/T9M+S6pFdcNtFYsp+Y43HYDQ= @@ -128,11 +130,11 @@ github.com/go-openapi/jsonreference v0.20.2 h1:3sVjiK66+uXK/6oQ8xgcRKcFgQ5KXa2Kv github.com/go-openapi/jsonreference v0.20.2/go.mod h1:Bl1zwGIM8/wsvqjsOQLJ/SH+En5Ap4rVB5KVcIDZG2k= 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-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572 h1:tfuBGBXKqDEevZMzYi5KSi8KkcZtzBcTgAUUtapy0OI= github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572/go.mod h1:9Pwr4B2jHnOSGXyyzV8ROjYa2ojvAY6HCGYYfMoC3Ls= github.com/go-test/deep v1.0.7 h1:/VSMRlnY/JSyqxQUzQLKVMAskpY/NZKFA5j2P+0pP2M= github.com/go-test/deep v1.0.7/go.mod h1:QV8Hv/iy04NyLBxAdO9njL0iVPN1S4d/A3NVv1V36o8= -github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zVXpSg4= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= github.com/golang-jwt/jwt/v5 v5.0.0 h1:1n1XNM9hk7O9mnQoNBGolZvzebBQ7p93ULHRc28XJUE= @@ -214,8 +216,8 @@ github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+ github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= github.com/googleapis/gax-go/v2 v2.7.1 h1:gF4c0zjUP2H/s/hEGyLA3I0fA2ZWjzYiONAD6cvPr8A= github.com/googleapis/gax-go/v2 v2.7.1/go.mod h1:4orTrqY6hXxxaUL4LHIPl6lGo8vAE38/qKbhSAKP6QI= -github.com/grpc-ecosystem/go-grpc-middleware v1.1.0 h1:THDBEeQ9xZ8JEaCLyLQqXMMdRqNr0QAUJTIkQAUtFjg= -github.com/grpc-ecosystem/go-grpc-middleware v1.1.0/go.mod h1:f5nM7jw/oeRSadq3xCzHAvxcr8HZnzsqU6ILg/0NiiE= +github.com/grpc-ecosystem/go-grpc-middleware v1.3.0 h1:+9834+KizmvFV7pXQGSXQTsaWhq2GjuNUt0aUU0YBYw= +github.com/grpc-ecosystem/go-grpc-middleware v1.3.0/go.mod h1:z0ButlSOZa5vEBq9m2m2hlwIgKw+rp3sdCBRoJY+30Y= github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0 h1:Ovs26xHkKqVztRpIrF/92BcuyuQ/YW4NSIpoGtfXNho= github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk= github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw= @@ -241,10 +243,10 @@ github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnr 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= github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk= -github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvWXihfKN4Q= github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= +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.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= @@ -263,8 +265,9 @@ github.com/mattn/go-colorable v0.1.9/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope github.com/mattn/go-colorable v0.1.12 h1:jF+Du6AlPIjs2BiUiQlKOX0rt3SujHxPnksPKZbaA40= github.com/mattn/go-colorable v0.1.12/go.mod h1:u5H1YNBxpqRaxsYJYSkiCWKzEfiAb1Gb520KVy5xxl4= github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= -github.com/mattn/go-isatty v0.0.14 h1:yVuAays6BHfxijgZPzw+3Zlu5yQgKGP2/hcQbHb7S9Y= github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94= +github.com/mattn/go-isatty v0.0.16 h1:bq3VjFmv/sOjHtdEhmkEV4x1AJtvUvOJ2PFAZ5+peKQ= +github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= github.com/matttproud/golang_protobuf_extensions v1.0.4 h1:mmDVorXM7PCGKw94cs5zkfA9PSy5pEvNWRP0ET0TIVo= github.com/matttproud/golang_protobuf_extensions v1.0.4/go.mod h1:BSXmuO+STAnVfrANrmjBb36TMTDstsz7MSK+HVaYKv4= github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyuac5Z2hdY= @@ -305,8 +308,8 @@ github.com/rogpeppe/go-internal v1.11.0 h1:cWPaGQEPrBb5/AsnsZesgZZ9yb1OQ+GOISoDN github.com/rogpeppe/go-internal v1.11.0/go.mod h1:ddIwULY96R17DhadqLgMfk9H9tvdUzkipdSkR5nkCZA= github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= -github.com/sirupsen/logrus v1.7.0 h1:ShrD1U9pZB12TX0cVy0DtePoCH97K8EtX+mg7ZARUtM= -github.com/sirupsen/logrus v1.7.0/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= +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/cobra v1.7.0 h1:hyqWnYt1ZQShIddO5kBpj3vu05/++x6tJ6dg8EC572I= @@ -364,8 +367,8 @@ golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8U golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.13.0 h1:mvySKfSWJ+UKUii46M40LOvyWfN0s2U+46/jDd0e6Ck= -golang.org/x/crypto v0.13.0/go.mod h1:y6Z2r+Rw4iayiXXAIxJIDAJ1zMW4yaTpebo8fPOliYc= +golang.org/x/crypto v0.14.0 h1:wBqGXzWJW6m1XrIKlAH0Hs1JJ7+9KBwnIO8v66Q9cHc= +golang.org/x/crypto v0.14.0/go.mod h1:MVFd36DqK4CsrnJYDkBA3VC4m2GkXAM0PvzMCn4JQf4= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= @@ -376,8 +379,8 @@ golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u0 golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM= golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU= -golang.org/x/exp v0.0.0-20220722155223-a9213eeb770e h1:+WEEuIdZHnUeJJmEUjyYC2gfUMj69yZXw17EnHg/otA= -golang.org/x/exp v0.0.0-20220722155223-a9213eeb770e/go.mod h1:Kr81I6Kryrl9sr8s2FK3vxD90NdsKWRuOIl2O4CvYbA= +golang.org/x/exp v0.0.0-20231005195138-3e424a577f31 h1:9k5exFQKQglLo+RoP+4zMjOFE14P6+vyR0baDAi0Rcs= +golang.org/x/exp v0.0.0-20231005195138-3e424a577f31/go.mod h1:S2oDrQGGwySpoQPVqRShND87VCbxmc6bL1Yd2oYrm6k= golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= @@ -428,8 +431,8 @@ golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwY golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= -golang.org/x/net v0.15.0 h1:ugBLEUaxABaB5AJqW9enI0ACdci2RUd4eP51NTBvuJ8= -golang.org/x/net v0.15.0/go.mod h1:idbUs1IY1+zTqbi8yxTbhexhEEk5ur9LInksu6HrEpk= +golang.org/x/net v0.17.0 h1:pVaXccu2ozPjCXewfr1S7xza/zcXTity9cCdXQYSjIM= +golang.org/x/net v0.17.0/go.mod h1:NxSsAGuq816PNPmqtQdLE42eU2Fs7NoRIZrHJAlaCOE= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -458,7 +461,6 @@ golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191001151750-bb3f8db39f24/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191228213918-04cbcbbfeed8/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200113162924-86b910548bc1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -484,12 +486,14 @@ golang.org/x/sys v0.0.0-20210616045830-e2b7044e8c71/go.mod h1:oPkhp1MJrh7nUepCBc 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-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.12.0 h1:CM0HF96J0hcLAwsHPJZjfdNzs0gftsLfgKt57wWHJ0o= -golang.org/x/sys v0.12.0/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-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.13.0 h1:Af8nKPmuFypiUBjVoU9V20FiaFXOcuZI21p0ycVYYGE= +golang.org/x/sys v0.13.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= 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.12.0 h1:/ZfYdc3zq+q02Rv9vGqTeSItdzZTSNDmfTi0mBAuidU= -golang.org/x/term v0.12.0/go.mod h1:owVbMEjm3cBLCHdkQu9b1opXd4ETQWc3BhuQGKgXgvU= +golang.org/x/term v0.13.0 h1:bb+I9cTfFazGW51MZqBVmZy7+JEJMouUHTUSKVQLBek= +golang.org/x/term v0.13.0/go.mod h1:LTmsnFJwVN6bCy1rVCoS+qHT1HhALEFxKncY3WNNh4U= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -504,7 +508,6 @@ golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxb golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.3.0 h1:rg5rLMjNzMS1RkNLzCG38eapWhnYLFYXDXj2gOlr8j4= golang.org/x/time v0.3.0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/tools v0.0.0-20180221164845-07fd8470d635/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= @@ -547,8 +550,8 @@ golang.org/x/tools v0.0.0-20200729194436-6467de6f59a7/go.mod h1:njjCfa9FT2d7l9Bc golang.org/x/tools v0.0.0-20200804011535-6c149bb5ef0d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= golang.org/x/tools v0.0.0-20200825202427-b303f430e36d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.9.3 h1:Gn1I8+64MsuTb/HpH+LmQtNas23LhUVr3rYZ0eKuaMM= -golang.org/x/tools v0.9.3/go.mod h1:owI94Op576fPu3cIGQeHs3joujW/2Oc6MtlxbF5dfNc= +golang.org/x/tools v0.13.0 h1:Iey4qkscZuv0VvIt8E0neZjtPVQFSc870HQ448QgEmQ= +golang.org/x/tools v0.13.0/go.mod h1:HvlwmtVNQAhOuCjW7xxvovg8wbNq7LwfXh/k7wXUl58= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= @@ -604,6 +607,7 @@ google.golang.org/genproto v0.0.0-20200228133532-8c2c7df3a383/go.mod h1:55QSHmfG google.golang.org/genproto v0.0.0-20200305110556-506484158171/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200312145019-da6875a35672/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200331122359-1ee6d9798940/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200423170343-7949de9c1215/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200430143042-b979b6f78d84/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200511104702-f5ebc3bea380/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200513103714-09dca8ec2884/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= diff --git a/flyteidl/protos/docs/core/core.rst b/flyteidl/protos/docs/core/core.rst index dd3cf71341..d50ec92742 100644 --- a/flyteidl/protos/docs/core/core.rst +++ b/flyteidl/protos/docs/core/core.rst @@ -528,6 +528,52 @@ flyteidl/core/errors.proto +.. _ref_flyteidl.core.CacheEvictionError: + +CacheEvictionError +------------------------------------------------------------------ + +Error returned if eviction of cached output fails and should be re-tried by the user. + + + +.. csv-table:: CacheEvictionError type fields + :header: "Field", "Type", "Label", "Description" + :widths: auto + + "code", ":ref:`ref_flyteidl.core.CacheEvictionError.Code`", "", "Error code to match type of cache eviction error encountered." + "message", ":ref:`ref_string`", "", "More detailed error message explaining the reason for the cache eviction failure." + "node_execution_id", ":ref:`ref_flyteidl.core.NodeExecutionIdentifier`", "", "ID of the node execution the cache eviction failed for." + "task_execution_id", ":ref:`ref_flyteidl.core.TaskExecutionIdentifier`", "", "ID of the task execution the cache eviction failed for (if the node execution was part of a task execution)." + "workflow_execution_id", ":ref:`ref_flyteidl.core.WorkflowExecutionIdentifier`", "", "ID of the workflow execution the cache eviction failed for (if the node execution was part of a workflow execution)." + + + + + + + +.. _ref_flyteidl.core.CacheEvictionErrorList: + +CacheEvictionErrorList +------------------------------------------------------------------ + +List of :ref:`ref_flyteidl.core.CacheEvictionError` encountered during a cache eviction request. + + + +.. csv-table:: CacheEvictionErrorList type fields + :header: "Field", "Type", "Label", "Description" + :widths: auto + + "errors", ":ref:`ref_flyteidl.core.CacheEvictionError`", "repeated", "" + + + + + + + .. _ref_flyteidl.core.ContainerError: ContainerError @@ -579,6 +625,25 @@ failure reasons to the execution engine. +.. _ref_flyteidl.core.CacheEvictionError.Code: + +CacheEvictionError.Code +------------------------------------------------------------------ + +Defines codes for distinguishing between errors encountered during cache eviction. + +.. csv-table:: Enum CacheEvictionError.Code values + :header: "Name", "Number", "Description" + :widths: auto + + "INTERNAL", "0", "Indicates a generic internal error occurred." + "RESERVATION_NOT_ACQUIRED", "1", "Indicates no reservation could be acquired before deleting an artifact." + "DATABASE_UPDATE_FAILED", "2", "Indicates updating the database entry related to the node execution failed." + "ARTIFACT_DELETE_FAILED", "3", "Indicates deleting the artifact from datacatalog failed." + "RESERVATION_NOT_RELEASED", "4", "Indicates the reservation previously acquired could not be released for an artifact." + + + .. _ref_flyteidl.core.ContainerError.Kind: ContainerError.Kind diff --git a/flyteidl/protos/docs/datacatalog/datacatalog.rst b/flyteidl/protos/docs/datacatalog/datacatalog.rst index 6ca4328f95..fc3a3fa5a5 100644 --- a/flyteidl/protos/docs/datacatalog/datacatalog.rst +++ b/flyteidl/protos/docs/datacatalog/datacatalog.rst @@ -261,6 +261,43 @@ Dataset properties we can filter by +.. _ref_datacatalog.DeleteArtifactRequest: + +DeleteArtifactRequest +------------------------------------------------------------------ + +Request message for deleting an Artifact and its associated ArtifactData. + + + +.. csv-table:: DeleteArtifactRequest type fields + :header: "Field", "Type", "Label", "Description" + :widths: auto + + "dataset", ":ref:`ref_datacatalog.DatasetID`", "", "ID of dataset the artifact is associated with" + "artifact_id", ":ref:`ref_string`", "", "" + "tag_name", ":ref:`ref_string`", "", "" + + + + + + + +.. _ref_datacatalog.DeleteArtifactResponse: + +DeleteArtifactResponse +------------------------------------------------------------------ + +Response message for deleting an Artifact. + + + + + + + + .. _ref_datacatalog.FilterExpression: FilterExpression @@ -915,6 +952,7 @@ Artifacts are associated with a Dataset, and can be tagged for retrieval. "ListArtifacts", ":ref:`ref_datacatalog.ListArtifactsRequest`", ":ref:`ref_datacatalog.ListArtifactsResponse`", "Return a paginated list of artifacts" "ListDatasets", ":ref:`ref_datacatalog.ListDatasetsRequest`", ":ref:`ref_datacatalog.ListDatasetsResponse`", "Return a paginated list of datasets" "UpdateArtifact", ":ref:`ref_datacatalog.UpdateArtifactRequest`", ":ref:`ref_datacatalog.UpdateArtifactResponse`", "Updates an existing artifact, overwriting the stored artifact data in the underlying blob storage." + "DeleteArtifact", ":ref:`ref_datacatalog.DeleteArtifactRequest`", ":ref:`ref_datacatalog.DeleteArtifactResponse`", "Deletes an existing artifact, removing the stored artifact data from the underlying blob storage." "GetOrExtendReservation", ":ref:`ref_datacatalog.GetOrExtendReservationRequest`", ":ref:`ref_datacatalog.GetOrExtendReservationResponse`", "Attempts to get or extend a reservation for the corresponding artifact. If one already exists (ie. another entity owns the reservation) then that reservation is retrieved. Once you acquire a reservation, you need to periodically extend the reservation with an identical call. If the reservation is not extended before the defined expiration, it may be acquired by another task. Note: We may have multiple concurrent tasks with the same signature and the same input that try to populate the same artifact at the same time. Thus with reservation, only one task can run at a time, until the reservation expires. Note: If task A does not extend the reservation in time and the reservation expires, another task B may take over the reservation, resulting in two tasks A and B running in parallel. So a third task C may get the Artifact from A or B, whichever writes last." "ReleaseReservation", ":ref:`ref_datacatalog.ReleaseReservationRequest`", ":ref:`ref_datacatalog.ReleaseReservationResponse`", "Release the reservation when the task holding the spot fails so that the other tasks can grab the spot." diff --git a/flyteidl/protos/docs/service/service.rst b/flyteidl/protos/docs/service/service.rst index 3ca8ff500c..5d76bce851 100644 --- a/flyteidl/protos/docs/service/service.rst +++ b/flyteidl/protos/docs/service/service.rst @@ -225,6 +225,88 @@ RPCs defined in this service must be anonymously accessible. +.. _ref_flyteidl/service/cache.proto: + +flyteidl/service/cache.proto +================================================================== + + + + + +.. _ref_flyteidl.service.EvictCacheResponse: + +EvictCacheResponse +------------------------------------------------------------------ + + + + + +.. csv-table:: EvictCacheResponse type fields + :header: "Field", "Type", "Label", "Description" + :widths: auto + + "errors", ":ref:`ref_flyteidl.core.CacheEvictionErrorList`", "", "List of errors encountered during cache eviction (if any)." + + + + + + + +.. _ref_flyteidl.service.EvictTaskExecutionCacheRequest: + +EvictTaskExecutionCacheRequest +------------------------------------------------------------------ + + + + + +.. csv-table:: EvictTaskExecutionCacheRequest type fields + :header: "Field", "Type", "Label", "Description" + :widths: auto + + "task_execution_id", ":ref:`ref_flyteidl.core.TaskExecutionIdentifier`", "", "Identifier of :ref:`ref_flyteidl.admin.TaskExecution` to evict cache for." + + + + + + +.. + end messages + + +.. + end enums + + +.. + end HasExtensions + + + +.. _ref_flyteidl.service.CacheService: + +CacheService +------------------------------------------------------------------ + +CacheService defines an RPC Service for interacting with cached data in Flyte on a high level basis. + +.. csv-table:: CacheService service methods + :header: "Method Name", "Request Type", "Response Type", "Description" + :widths: auto + + "EvictTaskExecutionCache", ":ref:`ref_flyteidl.service.EvictTaskExecutionCacheRequest`", ":ref:`ref_flyteidl.service.EvictCacheResponse`", "Evicts all cached data for the referenced :ref:`ref_flyteidl.admin.TaskExecution`." + +.. + end services + + + + .. _ref_flyteidl/service/dataproxy.proto: flyteidl/service/dataproxy.proto diff --git a/flyteidl/protos/flyteidl/core/errors.proto b/flyteidl/protos/flyteidl/core/errors.proto index 4d25389349..a3e2a72b8c 100644 --- a/flyteidl/protos/flyteidl/core/errors.proto +++ b/flyteidl/protos/flyteidl/core/errors.proto @@ -5,6 +5,7 @@ package flyteidl.core; option go_package = "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/core"; import "flyteidl/core/execution.proto"; +import "flyteidl/core/identifier.proto"; // Error message to propagate detailed errors from container executions to the execution // engine. @@ -33,3 +34,40 @@ message ErrorDocument { // The error raised during execution. ContainerError error = 1; } + +// Error returned if eviction of cached output fails and should be re-tried by the user. +message CacheEvictionError { + // Defines codes for distinguishing between errors encountered during cache eviction. + enum Code { + // Indicates a generic internal error occurred. + INTERNAL = 0; + // Indicates no reservation could be acquired before deleting an artifact. + RESERVATION_NOT_ACQUIRED = 1; + // Indicates updating the database entry related to the node execution failed. + DATABASE_UPDATE_FAILED = 2; + // Indicates deleting the artifact from datacatalog failed. + ARTIFACT_DELETE_FAILED = 3; + // Indicates the reservation previously acquired could not be released for an artifact. + RESERVATION_NOT_RELEASED = 4; + + } + + // Error code to match type of cache eviction error encountered. + Code code = 1; + // More detailed error message explaining the reason for the cache eviction failure. + string message = 2; + // ID of the node execution the cache eviction failed for. + core.NodeExecutionIdentifier node_execution_id = 3; + // Source of the node execution. + oneof source { + // ID of the task execution the cache eviction failed for (if the node execution was part of a task execution). + core.TaskExecutionIdentifier task_execution_id = 4; + // ID of the workflow execution the cache eviction failed for (if the node execution was part of a workflow execution). + core.WorkflowExecutionIdentifier workflow_execution_id = 5; + } +} + +// List of :ref:`ref_flyteidl.core.CacheEvictionError` encountered during a cache eviction request. +message CacheEvictionErrorList { + repeated CacheEvictionError errors = 1; +} \ No newline at end of file diff --git a/flyteidl/protos/flyteidl/datacatalog/datacatalog.proto b/flyteidl/protos/flyteidl/datacatalog/datacatalog.proto index e296603113..595cce1783 100644 --- a/flyteidl/protos/flyteidl/datacatalog/datacatalog.proto +++ b/flyteidl/protos/flyteidl/datacatalog/datacatalog.proto @@ -40,6 +40,9 @@ service DataCatalog { // Updates an existing artifact, overwriting the stored artifact data in the underlying blob storage. rpc UpdateArtifact (UpdateArtifactRequest) returns (UpdateArtifactResponse); + // Deletes an existing artifact, removing the stored artifact data from the underlying blob storage. + rpc DeleteArtifact (DeleteArtifactRequest) returns (DeleteArtifactResponse); + // Attempts to get or extend a reservation for the corresponding artifact. If one already exists // (ie. another entity owns the reservation) then that reservation is retrieved. // Once you acquire a reservation, you need to periodically extend the reservation with an @@ -202,6 +205,27 @@ message UpdateArtifactResponse { string artifact_id = 1; } +/* + * Request message for deleting an Artifact and its associated ArtifactData. + */ +message DeleteArtifactRequest { + // ID of dataset the artifact is associated with + DatasetID dataset = 1; + + // Either ID of artifact or name of tag of existing artifact + oneof query_handle { + string artifact_id = 2; + string tag_name = 3; + } +} + +/* + * Response message for deleting an Artifact. + */ +message DeleteArtifactResponse { + +} + /* * ReservationID message that is composed of several string fields. */ diff --git a/flyteidl/protos/flyteidl/service/cache.proto b/flyteidl/protos/flyteidl/service/cache.proto new file mode 100644 index 0000000000..acf0c500c7 --- /dev/null +++ b/flyteidl/protos/flyteidl/service/cache.proto @@ -0,0 +1,34 @@ +syntax = "proto3"; +package flyteidl.service; + +option go_package = "github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/service"; + +import "google/api/annotations.proto"; + +import "flyteidl/core/errors.proto"; +import "flyteidl/core/identifier.proto"; + + +message EvictTaskExecutionCacheRequest { + // Identifier of :ref:`ref_flyteidl.admin.TaskExecution` to evict cache for. + core.TaskExecutionIdentifier task_execution_id = 1; +} + +message EvictCacheResponse { + // List of errors encountered during cache eviction (if any). + core.CacheEvictionErrorList errors = 1; +} + +// CacheService defines an RPC Service for interacting with cached data in Flyte on a high level basis. +service CacheService { + + // Evicts all cached data for the referenced :ref:`ref_flyteidl.admin.TaskExecution`. + rpc EvictTaskExecutionCache (EvictTaskExecutionCacheRequest) returns (EvictCacheResponse) { + option (google.api.http) = { + delete: "/api/v1/cache/task_executions/{task_execution_id.node_execution_id.execution_id.project}/{task_execution_id.node_execution_id.execution_id.domain}/{task_execution_id.node_execution_id.execution_id.name}/{task_execution_id.node_execution_id.node_id}/{task_execution_id.task_id.project}/{task_execution_id.task_id.domain}/{task_execution_id.task_id.name}/{task_execution_id.task_id.version}/{task_execution_id.retry_attempt}" + }; + // option (grpc.gateway.protoc_gen_swagger.options.openapiv2_operation) = { + // description: "Evicts all cached data for the referenced task execution." + // }; + } +} diff --git a/flyteplugins/go.mod b/flyteplugins/go.mod index be1331697b..d36e843127 100644 --- a/flyteplugins/go.mod +++ b/flyteplugins/go.mod @@ -25,18 +25,18 @@ require ( github.com/ray-project/kuberay/ray-operator v1.0.0 github.com/spf13/pflag v1.0.5 github.com/stretchr/testify v1.8.4 - golang.org/x/exp v0.0.0-20220722155223-a9213eeb770e + golang.org/x/exp v0.0.0-20231005195138-3e424a577f31 golang.org/x/net v0.17.0 golang.org/x/oauth2 v0.8.0 google.golang.org/api v0.114.0 google.golang.org/grpc v1.56.1 google.golang.org/protobuf v1.30.0 gotest.tools v2.2.0+incompatible - k8s.io/api v0.28.2 - k8s.io/apimachinery v0.28.2 - k8s.io/client-go v0.28.1 + k8s.io/api v0.28.3 + k8s.io/apimachinery v0.28.3 + k8s.io/client-go v0.28.3 k8s.io/utils v0.0.0-20230406110748-d93618cff8a2 - sigs.k8s.io/controller-runtime v0.12.1 + sigs.k8s.io/controller-runtime v0.16.3 ) require ( @@ -44,7 +44,7 @@ require ( cloud.google.com/go/compute v1.19.1 // indirect cloud.google.com/go/compute/metadata v0.2.3 // indirect cloud.google.com/go/iam v0.13.0 // indirect - cloud.google.com/go/storage v1.28.1 // indirect + cloud.google.com/go/storage v1.29.0 // indirect github.com/Azure/azure-sdk-for-go/sdk/azcore v1.7.2 // indirect github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.3.1 // indirect github.com/Azure/azure-sdk-for-go/sdk/internal v1.3.0 // indirect @@ -60,7 +60,7 @@ require ( github.com/cespare/xxhash v1.1.0 // indirect github.com/cespare/xxhash/v2 v2.2.0 // indirect github.com/davecgh/go-spew v1.1.1 // indirect - github.com/emicklei/go-restful/v3 v3.9.0 // indirect + github.com/emicklei/go-restful/v3 v3.11.0 // indirect github.com/evanphx/json-patch v5.6.0+incompatible // indirect github.com/evanphx/json-patch/v5 v5.6.0 // indirect github.com/fatih/color v1.13.0 // indirect @@ -90,7 +90,7 @@ require ( github.com/kylelemons/godebug v1.1.0 // indirect github.com/mailru/easyjson v0.7.7 // indirect github.com/mattn/go-colorable v0.1.12 // indirect - github.com/mattn/go-isatty v0.0.14 // indirect + github.com/mattn/go-isatty v0.0.16 // indirect github.com/matttproud/golang_protobuf_extensions v1.0.4 // indirect github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect github.com/modern-go/reflect2 v1.0.2 // indirect diff --git a/flyteplugins/go.sum b/flyteplugins/go.sum index 662b36b87e..3b80c80c03 100644 --- a/flyteplugins/go.sum +++ b/flyteplugins/go.sum @@ -45,8 +45,8 @@ cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohl cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs= cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0= cloud.google.com/go/storage v1.14.0/go.mod h1:GrKmX003DSIwi9o29oFT7YDnHYwZoctc3fOKtUw0Xmo= -cloud.google.com/go/storage v1.28.1 h1:F5QDG5ChchaAVQhINh24U99OWHURqrW8OmQcGKXcbgI= -cloud.google.com/go/storage v1.28.1/go.mod h1:Qnisd4CqDdo6BGs2AD5LLnEsmSQ80wQ5ogcBBKhU86Y= +cloud.google.com/go/storage v1.29.0 h1:6weCgzRvMg7lzuUurI4697AqIRPU1SvzHhynwpW31jI= +cloud.google.com/go/storage v1.29.0/go.mod h1:4puEjyTKnku6gfKoTfNOU/W+a9JyuVNxjpS5GBrB8h4= dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= github.com/Azure/azure-sdk-for-go/sdk/azcore v1.7.2 h1:t5+QXLCK9SVi0PPdaY0PrFvYUo24KwA0QwxnaHRSVd4= github.com/Azure/azure-sdk-for-go/sdk/azcore v1.7.2/go.mod h1:bjGvMhVMb+EEm3VRNQawDMUyMMjo+S5ewNjflkep/0Q= @@ -122,8 +122,8 @@ 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/emicklei/go-restful/v3 v3.9.0 h1:XwGDlfxEnQZzuopoqxwSEllNcCOM9DhhFyhFIIGKwxE= -github.com/emicklei/go-restful/v3 v3.9.0/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRry+4bhvbpWn3mrbc= +github.com/emicklei/go-restful/v3 v3.11.0 h1:rAQeMHw1c7zTmncogyy8VvRZwtkmkZ4FxERmMY4rD+g= +github.com/emicklei/go-restful/v3 v3.11.0/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRry+4bhvbpWn3mrbc= github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= @@ -302,8 +302,9 @@ github.com/mattn/go-colorable v0.1.9/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope github.com/mattn/go-colorable v0.1.12 h1:jF+Du6AlPIjs2BiUiQlKOX0rt3SujHxPnksPKZbaA40= github.com/mattn/go-colorable v0.1.12/go.mod h1:u5H1YNBxpqRaxsYJYSkiCWKzEfiAb1Gb520KVy5xxl4= github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= -github.com/mattn/go-isatty v0.0.14 h1:yVuAays6BHfxijgZPzw+3Zlu5yQgKGP2/hcQbHb7S9Y= github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94= +github.com/mattn/go-isatty v0.0.16 h1:bq3VjFmv/sOjHtdEhmkEV4x1AJtvUvOJ2PFAZ5+peKQ= +github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= github.com/matttproud/golang_protobuf_extensions v1.0.4 h1:mmDVorXM7PCGKw94cs5zkfA9PSy5pEvNWRP0ET0TIVo= github.com/matttproud/golang_protobuf_extensions v1.0.4/go.mod h1:BSXmuO+STAnVfrANrmjBb36TMTDstsz7MSK+HVaYKv4= github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyuac5Z2hdY= @@ -430,8 +431,8 @@ golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u0 golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM= golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU= -golang.org/x/exp v0.0.0-20220722155223-a9213eeb770e h1:+WEEuIdZHnUeJJmEUjyYC2gfUMj69yZXw17EnHg/otA= -golang.org/x/exp v0.0.0-20220722155223-a9213eeb770e/go.mod h1:Kr81I6Kryrl9sr8s2FK3vxD90NdsKWRuOIl2O4CvYbA= +golang.org/x/exp v0.0.0-20231005195138-3e424a577f31 h1:9k5exFQKQglLo+RoP+4zMjOFE14P6+vyR0baDAi0Rcs= +golang.org/x/exp v0.0.0-20231005195138-3e424a577f31/go.mod h1:S2oDrQGGwySpoQPVqRShND87VCbxmc6bL1Yd2oYrm6k= golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= @@ -455,8 +456,8 @@ 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.10.0 h1:lFO9qtOdlre5W1jxS3r/4szv2/6iXxScdzjoBMXNhYk= -golang.org/x/mod v0.10.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= +golang.org/x/mod v0.12.0 h1:rmsUpXtvNzj340zd98LZ4KntptpfRHwpFOHG188oHXc= +golang.org/x/mod v0.12.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= 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-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -557,6 +558,7 @@ golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6/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-20220715151400-c0bba94af5f8/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.13.0 h1:Af8nKPmuFypiUBjVoU9V20FiaFXOcuZI21p0ycVYYGE= golang.org/x/sys v0.13.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= @@ -628,8 +630,8 @@ 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.9.3 h1:Gn1I8+64MsuTb/HpH+LmQtNas23LhUVr3rYZ0eKuaMM= -golang.org/x/tools v0.9.3/go.mod h1:owI94Op576fPu3cIGQeHs3joujW/2Oc6MtlxbF5dfNc= +golang.org/x/tools v0.13.0 h1:Iey4qkscZuv0VvIt8E0neZjtPVQFSc870HQ448QgEmQ= +golang.org/x/tools v0.13.0/go.mod h1:HvlwmtVNQAhOuCjW7xxvovg8wbNq7LwfXh/k7wXUl58= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= diff --git a/flyteplugins/go/tasks/pluginmachinery/catalog/client.go b/flyteplugins/go/tasks/pluginmachinery/catalog/client.go index 56cb4be202..a3354e63f7 100644 --- a/flyteplugins/go/tasks/pluginmachinery/catalog/client.go +++ b/flyteplugins/go/tasks/pluginmachinery/catalog/client.go @@ -138,6 +138,9 @@ type Client interface { // GetOrExtendReservation tries to retrieve a (valid) reservation for the given key, creating a new one using the // specified owner ID if none was found or updating an existing one if it has expired. GetOrExtendReservation(ctx context.Context, key Key, ownerID string, heartbeatInterval time.Duration) (*datacatalog.Reservation, error) + // GetOrExtendReservationByArtifactTag tries to retrieve a (valid) reservation for the given dataset ID and artifact + // tag, creating a new one using the specified owner ID if none was found or updating an existing one if it has expired. + GetOrExtendReservationByArtifactTag(ctx context.Context, datasetID *datacatalog.DatasetID, artifactTag string, ownerID string, heartbeatInterval time.Duration) (*datacatalog.Reservation, error) // Put stores the given data using the specified key, creating artifact entries as required. // To update an existing artifact, use Update instead. Put(ctx context.Context, key Key, reader io.OutputReader, metadata Metadata) (Status, error) @@ -146,6 +149,17 @@ type Client interface { Update(ctx context.Context, key Key, reader io.OutputReader, metadata Metadata) (Status, error) // ReleaseReservation releases an acquired reservation for the given key and owner ID. ReleaseReservation(ctx context.Context, key Key, ownerID string) error + // ReleaseReservationByArtifactTag releases an acquired reservation for the given dataset ID, artifact tag and + // owner ID. + ReleaseReservationByArtifactTag(ctx context.Context, datasetID *datacatalog.DatasetID, artifactTag string, ownerID string) error + // Delete removes the artifact associated with the given key and deletes its underlying data from blob storage. + Delete(ctx context.Context, key Key) error + // DeleteByArtifactTag removes the artifact associated with the given dataset ID and artifact tag and deletes its + // underlying data from blob storage. + DeleteByArtifactTag(ctx context.Context, datasetID *datacatalog.DatasetID, artifactTag string) error + // DeleteByArtifactID removes the artifact associated with the given dataset and artifact ID and deletes its + // underlying data from blob storage. + DeleteByArtifactID(ctx context.Context, datasetID *datacatalog.DatasetID, artifactID string) error } func IsNotFound(err error) bool { diff --git a/flyteplugins/go/tasks/pluginmachinery/catalog/mocks/client.go b/flyteplugins/go/tasks/pluginmachinery/catalog/mocks/client.go index 584a936ae4..44b702e5a4 100644 --- a/flyteplugins/go/tasks/pluginmachinery/catalog/mocks/client.go +++ b/flyteplugins/go/tasks/pluginmachinery/catalog/mocks/client.go @@ -21,6 +21,102 @@ type Client struct { mock.Mock } +type Client_Delete struct { + *mock.Call +} + +func (_m Client_Delete) Return(_a0 error) *Client_Delete { + return &Client_Delete{Call: _m.Call.Return(_a0)} +} + +func (_m *Client) OnDelete(ctx context.Context, key catalog.Key) *Client_Delete { + c_call := _m.On("Delete", ctx, key) + return &Client_Delete{Call: c_call} +} + +func (_m *Client) OnDeleteMatch(matchers ...interface{}) *Client_Delete { + c_call := _m.On("Delete", matchers...) + return &Client_Delete{Call: c_call} +} + +// Delete provides a mock function with given fields: ctx, key +func (_m *Client) Delete(ctx context.Context, key catalog.Key) error { + ret := _m.Called(ctx, key) + + var r0 error + if rf, ok := ret.Get(0).(func(context.Context, catalog.Key) error); ok { + r0 = rf(ctx, key) + } else { + r0 = ret.Error(0) + } + + return r0 +} + +type Client_DeleteByArtifactID struct { + *mock.Call +} + +func (_m Client_DeleteByArtifactID) Return(_a0 error) *Client_DeleteByArtifactID { + return &Client_DeleteByArtifactID{Call: _m.Call.Return(_a0)} +} + +func (_m *Client) OnDeleteByArtifactID(ctx context.Context, datasetID *datacatalog.DatasetID, artifactID string) *Client_DeleteByArtifactID { + c_call := _m.On("DeleteByArtifactID", ctx, datasetID, artifactID) + return &Client_DeleteByArtifactID{Call: c_call} +} + +func (_m *Client) OnDeleteByArtifactIDMatch(matchers ...interface{}) *Client_DeleteByArtifactID { + c_call := _m.On("DeleteByArtifactID", matchers...) + return &Client_DeleteByArtifactID{Call: c_call} +} + +// DeleteByArtifactID provides a mock function with given fields: ctx, datasetID, artifactID +func (_m *Client) DeleteByArtifactID(ctx context.Context, datasetID *datacatalog.DatasetID, artifactID string) error { + ret := _m.Called(ctx, datasetID, artifactID) + + var r0 error + if rf, ok := ret.Get(0).(func(context.Context, *datacatalog.DatasetID, string) error); ok { + r0 = rf(ctx, datasetID, artifactID) + } else { + r0 = ret.Error(0) + } + + return r0 +} + +type Client_DeleteByArtifactTag struct { + *mock.Call +} + +func (_m Client_DeleteByArtifactTag) Return(_a0 error) *Client_DeleteByArtifactTag { + return &Client_DeleteByArtifactTag{Call: _m.Call.Return(_a0)} +} + +func (_m *Client) OnDeleteByArtifactTag(ctx context.Context, datasetID *datacatalog.DatasetID, artifactTag string) *Client_DeleteByArtifactTag { + c_call := _m.On("DeleteByArtifactTag", ctx, datasetID, artifactTag) + return &Client_DeleteByArtifactTag{Call: c_call} +} + +func (_m *Client) OnDeleteByArtifactTagMatch(matchers ...interface{}) *Client_DeleteByArtifactTag { + c_call := _m.On("DeleteByArtifactTag", matchers...) + return &Client_DeleteByArtifactTag{Call: c_call} +} + +// DeleteByArtifactTag provides a mock function with given fields: ctx, datasetID, artifactTag +func (_m *Client) DeleteByArtifactTag(ctx context.Context, datasetID *datacatalog.DatasetID, artifactTag string) error { + ret := _m.Called(ctx, datasetID, artifactTag) + + var r0 error + if rf, ok := ret.Get(0).(func(context.Context, *datacatalog.DatasetID, string) error); ok { + r0 = rf(ctx, datasetID, artifactTag) + } else { + r0 = ret.Error(0) + } + + return r0 +} + type Client_Get struct { *mock.Call } @@ -101,6 +197,47 @@ func (_m *Client) GetOrExtendReservation(ctx context.Context, key catalog.Key, o return r0, r1 } +type Client_GetOrExtendReservationByArtifactTag struct { + *mock.Call +} + +func (_m Client_GetOrExtendReservationByArtifactTag) Return(_a0 *datacatalog.Reservation, _a1 error) *Client_GetOrExtendReservationByArtifactTag { + return &Client_GetOrExtendReservationByArtifactTag{Call: _m.Call.Return(_a0, _a1)} +} + +func (_m *Client) OnGetOrExtendReservationByArtifactTag(ctx context.Context, datasetID *datacatalog.DatasetID, artifactTag string, ownerID string, heartbeatInterval time.Duration) *Client_GetOrExtendReservationByArtifactTag { + c_call := _m.On("GetOrExtendReservationByArtifactTag", ctx, datasetID, artifactTag, ownerID, heartbeatInterval) + return &Client_GetOrExtendReservationByArtifactTag{Call: c_call} +} + +func (_m *Client) OnGetOrExtendReservationByArtifactTagMatch(matchers ...interface{}) *Client_GetOrExtendReservationByArtifactTag { + c_call := _m.On("GetOrExtendReservationByArtifactTag", matchers...) + return &Client_GetOrExtendReservationByArtifactTag{Call: c_call} +} + +// GetOrExtendReservationByArtifactTag provides a mock function with given fields: ctx, datasetID, artifactTag, ownerID, heartbeatInterval +func (_m *Client) GetOrExtendReservationByArtifactTag(ctx context.Context, datasetID *datacatalog.DatasetID, artifactTag string, ownerID string, heartbeatInterval time.Duration) (*datacatalog.Reservation, error) { + ret := _m.Called(ctx, datasetID, artifactTag, ownerID, heartbeatInterval) + + var r0 *datacatalog.Reservation + if rf, ok := ret.Get(0).(func(context.Context, *datacatalog.DatasetID, string, string, time.Duration) *datacatalog.Reservation); ok { + r0 = rf(ctx, datasetID, artifactTag, ownerID, heartbeatInterval) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*datacatalog.Reservation) + } + } + + var r1 error + if rf, ok := ret.Get(1).(func(context.Context, *datacatalog.DatasetID, string, string, time.Duration) error); ok { + r1 = rf(ctx, datasetID, artifactTag, ownerID, heartbeatInterval) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + type Client_Put struct { *mock.Call } @@ -172,6 +309,38 @@ func (_m *Client) ReleaseReservation(ctx context.Context, key catalog.Key, owner return r0 } +type Client_ReleaseReservationByArtifactTag struct { + *mock.Call +} + +func (_m Client_ReleaseReservationByArtifactTag) Return(_a0 error) *Client_ReleaseReservationByArtifactTag { + return &Client_ReleaseReservationByArtifactTag{Call: _m.Call.Return(_a0)} +} + +func (_m *Client) OnReleaseReservationByArtifactTag(ctx context.Context, datasetID *datacatalog.DatasetID, artifactTag string, ownerID string) *Client_ReleaseReservationByArtifactTag { + c_call := _m.On("ReleaseReservationByArtifactTag", ctx, datasetID, artifactTag, ownerID) + return &Client_ReleaseReservationByArtifactTag{Call: c_call} +} + +func (_m *Client) OnReleaseReservationByArtifactTagMatch(matchers ...interface{}) *Client_ReleaseReservationByArtifactTag { + c_call := _m.On("ReleaseReservationByArtifactTag", matchers...) + return &Client_ReleaseReservationByArtifactTag{Call: c_call} +} + +// ReleaseReservationByArtifactTag provides a mock function with given fields: ctx, datasetID, artifactTag, ownerID +func (_m *Client) ReleaseReservationByArtifactTag(ctx context.Context, datasetID *datacatalog.DatasetID, artifactTag string, ownerID string) error { + ret := _m.Called(ctx, datasetID, artifactTag, ownerID) + + var r0 error + if rf, ok := ret.Get(0).(func(context.Context, *datacatalog.DatasetID, string, string) error); ok { + r0 = rf(ctx, datasetID, artifactTag, ownerID) + } else { + r0 = ret.Error(0) + } + + return r0 +} + type Client_Update struct { *mock.Call } diff --git a/flytepropeller/go.mod b/flytepropeller/go.mod index f541398b58..cc7021f55e 100644 --- a/flytepropeller/go.mod +++ b/flytepropeller/go.mod @@ -13,8 +13,6 @@ require ( github.com/go-redis/redis v6.15.7+incompatible github.com/go-test/deep v1.0.7 github.com/golang/protobuf v1.5.3 - github.com/google/uuid v1.3.1 - github.com/grpc-ecosystem/go-grpc-middleware v1.3.0 github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0 github.com/imdario/mergo v0.3.13 github.com/magiconair/properties v1.8.6 @@ -85,8 +83,10 @@ require ( github.com/google/gnostic-models v0.6.8 // indirect github.com/google/go-cmp v0.5.9 // indirect github.com/google/gofuzz v1.2.0 // indirect + github.com/google/uuid v1.3.1 // indirect github.com/googleapis/enterprise-certificate-proxy v0.2.3 // indirect github.com/googleapis/gax-go/v2 v2.7.1 // indirect + github.com/grpc-ecosystem/go-grpc-middleware v1.3.0 // indirect github.com/grpc-ecosystem/grpc-gateway/v2 v2.7.0 // indirect github.com/hashicorp/golang-lru v0.5.4 // indirect github.com/hashicorp/hcl v1.0.0 // indirect diff --git a/flytepropeller/pkg/controller/controller.go b/flytepropeller/pkg/controller/controller.go index de28612c54..510ccf1365 100644 --- a/flytepropeller/pkg/controller/controller.go +++ b/flytepropeller/pkg/controller/controller.go @@ -41,7 +41,6 @@ import ( "github.com/flyteorg/flyte/flytepropeller/pkg/controller/config" "github.com/flyteorg/flyte/flytepropeller/pkg/controller/executors" "github.com/flyteorg/flyte/flytepropeller/pkg/controller/nodes" - "github.com/flyteorg/flyte/flytepropeller/pkg/controller/nodes/catalog" errors3 "github.com/flyteorg/flyte/flytepropeller/pkg/controller/nodes/errors" "github.com/flyteorg/flyte/flytepropeller/pkg/controller/nodes/factory" "github.com/flyteorg/flyte/flytepropeller/pkg/controller/nodes/recovery" @@ -50,6 +49,7 @@ import ( "github.com/flyteorg/flyte/flytepropeller/pkg/controller/workflowstore" leader "github.com/flyteorg/flyte/flytepropeller/pkg/leaderelection" "github.com/flyteorg/flyte/flytepropeller/pkg/utils" + "github.com/flyteorg/flyte/flytestdlib/catalog" "github.com/flyteorg/flyte/flytestdlib/contextutils" stdErrs "github.com/flyteorg/flyte/flytestdlib/errors" "github.com/flyteorg/flyte/flytestdlib/logger" diff --git a/flytepropeller/pkg/controller/nodes/array/handler_test.go b/flytepropeller/pkg/controller/nodes/array/handler_test.go index f4107c1f11..d65e220221 100644 --- a/flytepropeller/pkg/controller/nodes/array/handler_test.go +++ b/flytepropeller/pkg/controller/nodes/array/handler_test.go @@ -18,7 +18,6 @@ import ( "github.com/flyteorg/flyte/flytepropeller/pkg/controller/config" execmocks "github.com/flyteorg/flyte/flytepropeller/pkg/controller/executors/mocks" "github.com/flyteorg/flyte/flytepropeller/pkg/controller/nodes" - "github.com/flyteorg/flyte/flytepropeller/pkg/controller/nodes/catalog" gatemocks "github.com/flyteorg/flyte/flytepropeller/pkg/controller/nodes/gate/mocks" "github.com/flyteorg/flyte/flytepropeller/pkg/controller/nodes/handler" "github.com/flyteorg/flyte/flytepropeller/pkg/controller/nodes/interfaces" @@ -26,6 +25,7 @@ import ( recoverymocks "github.com/flyteorg/flyte/flytepropeller/pkg/controller/nodes/recovery/mocks" "github.com/flyteorg/flyte/flytepropeller/pkg/controller/nodes/subworkflow/launchplan" "github.com/flyteorg/flyte/flytestdlib/bitarray" + "github.com/flyteorg/flyte/flytestdlib/catalog" "github.com/flyteorg/flyte/flytestdlib/contextutils" "github.com/flyteorg/flyte/flytestdlib/promutils" "github.com/flyteorg/flyte/flytestdlib/promutils/labeled" diff --git a/flytepropeller/pkg/controller/nodes/executor_test.go b/flytepropeller/pkg/controller/nodes/executor_test.go index 237928a937..577828f19f 100644 --- a/flytepropeller/pkg/controller/nodes/executor_test.go +++ b/flytepropeller/pkg/controller/nodes/executor_test.go @@ -30,7 +30,6 @@ import ( "github.com/flyteorg/flyte/flytepropeller/pkg/controller/config" "github.com/flyteorg/flyte/flytepropeller/pkg/controller/executors" mocks4 "github.com/flyteorg/flyte/flytepropeller/pkg/controller/executors/mocks" - "github.com/flyteorg/flyte/flytepropeller/pkg/controller/nodes/catalog" gatemocks "github.com/flyteorg/flyte/flytepropeller/pkg/controller/nodes/gate/mocks" "github.com/flyteorg/flyte/flytepropeller/pkg/controller/nodes/handler" "github.com/flyteorg/flyte/flytepropeller/pkg/controller/nodes/interfaces" @@ -38,6 +37,7 @@ import ( recoveryMocks "github.com/flyteorg/flyte/flytepropeller/pkg/controller/nodes/recovery/mocks" "github.com/flyteorg/flyte/flytepropeller/pkg/controller/nodes/subworkflow/launchplan" flyteassert "github.com/flyteorg/flyte/flytepropeller/pkg/utils/assert" + "github.com/flyteorg/flyte/flytestdlib/catalog" "github.com/flyteorg/flyte/flytestdlib/contextutils" "github.com/flyteorg/flyte/flytestdlib/promutils" "github.com/flyteorg/flyte/flytestdlib/promutils/labeled" diff --git a/flytepropeller/pkg/controller/workflow/executor_test.go b/flytepropeller/pkg/controller/workflow/executor_test.go index cc9910abc3..134f47c1ce 100644 --- a/flytepropeller/pkg/controller/workflow/executor_test.go +++ b/flytepropeller/pkg/controller/workflow/executor_test.go @@ -33,7 +33,6 @@ import ( "github.com/flyteorg/flyte/flytepropeller/pkg/controller/config" executorMocks "github.com/flyteorg/flyte/flytepropeller/pkg/controller/executors/mocks" "github.com/flyteorg/flyte/flytepropeller/pkg/controller/nodes" - "github.com/flyteorg/flyte/flytepropeller/pkg/controller/nodes/catalog" "github.com/flyteorg/flyte/flytepropeller/pkg/controller/nodes/factory" gateMocks "github.com/flyteorg/flyte/flytepropeller/pkg/controller/nodes/gate/mocks" "github.com/flyteorg/flyte/flytepropeller/pkg/controller/nodes/handler" @@ -42,6 +41,7 @@ import ( "github.com/flyteorg/flyte/flytepropeller/pkg/controller/nodes/subworkflow/launchplan" "github.com/flyteorg/flyte/flytepropeller/pkg/controller/nodes/task/fakeplugins" wfErrors "github.com/flyteorg/flyte/flytepropeller/pkg/controller/workflow/errors" + "github.com/flyteorg/flyte/flytestdlib/catalog" "github.com/flyteorg/flyte/flytestdlib/contextutils" "github.com/flyteorg/flyte/flytestdlib/logger" "github.com/flyteorg/flyte/flytestdlib/promutils" diff --git a/flytestdlib/.golangci.yml b/flytestdlib/.golangci.yml index 7f4dbc80e8..6d13f4a3b6 100644 --- a/flytestdlib/.golangci.yml +++ b/flytestdlib/.golangci.yml @@ -38,3 +38,6 @@ linters-settings: - default - prefix(github.com/flyteorg) skip-generated: true +issues: + exclude: + - copylocks diff --git a/flytestdlib/boilerplate/flyte/golangci_file/.golangci.yml b/flytestdlib/boilerplate/flyte/golangci_file/.golangci.yml index 7f4dbc80e8..6d13f4a3b6 100644 --- a/flytestdlib/boilerplate/flyte/golangci_file/.golangci.yml +++ b/flytestdlib/boilerplate/flyte/golangci_file/.golangci.yml @@ -38,3 +38,6 @@ linters-settings: - default - prefix(github.com/flyteorg) skip-generated: true +issues: + exclude: + - copylocks diff --git a/flytestdlib/catalog/client.go b/flytestdlib/catalog/client.go new file mode 100644 index 0000000000..a6eb27a3bb --- /dev/null +++ b/flytestdlib/catalog/client.go @@ -0,0 +1,25 @@ +package catalog + +import ( + "context" + "fmt" + + "google.golang.org/grpc" + + pluginCatalog "github.com/flyteorg/flyte/flyteplugins/go/tasks/pluginmachinery/catalog" + "github.com/flyteorg/flyte/flytestdlib/catalog/datacatalog" +) + +func NewCatalogClient(ctx context.Context, authOpt ...grpc.DialOption) (pluginCatalog.Client, error) { + catalogConfig := GetConfig() + + switch catalogConfig.Type { + case DataCatalogType: + return datacatalog.NewDataCatalog(ctx, catalogConfig.Endpoint, catalogConfig.Insecure, + catalogConfig.MaxCacheAge.Duration, catalogConfig.UseAdminAuth, catalogConfig.DefaultServiceConfig, + authOpt...) + case NoOpDiscoveryType, "": + return NOOPCatalog{}, nil + } + return nil, fmt.Errorf("no such catalog type available: %s", catalogConfig.Type) +} diff --git a/flytepropeller/pkg/controller/nodes/catalog/config.go b/flytestdlib/catalog/config.go similarity index 70% rename from flytepropeller/pkg/controller/nodes/catalog/config.go rename to flytestdlib/catalog/config.go index 2b0c484fb7..5d23a25b10 100644 --- a/flytepropeller/pkg/controller/nodes/catalog/config.go +++ b/flytestdlib/catalog/config.go @@ -1,13 +1,6 @@ package catalog import ( - "context" - "fmt" - - "google.golang.org/grpc" - - "github.com/flyteorg/flyte/flyteplugins/go/tasks/pluginmachinery/catalog" - "github.com/flyteorg/flyte/flytepropeller/pkg/controller/nodes/catalog/datacatalog" "github.com/flyteorg/flyte/flytestdlib/config" ) @@ -44,21 +37,7 @@ type Config struct { DefaultServiceConfig string `json:"default-service-config" pflag:"\"\", Set the default service config for the catalog gRPC client"` } -// GetConfig gets loaded config for Discovery +// GetConfig returns the parsed Catalog configuration func GetConfig() *Config { return configSection.GetConfig().(*Config) } - -func NewCatalogClient(ctx context.Context, authOpt ...grpc.DialOption) (catalog.Client, error) { - catalogConfig := GetConfig() - - switch catalogConfig.Type { - case DataCatalogType: - return datacatalog.NewDataCatalog(ctx, catalogConfig.Endpoint, catalogConfig.Insecure, - catalogConfig.MaxCacheAge.Duration, catalogConfig.UseAdminAuth, catalogConfig.DefaultServiceConfig, - authOpt...) - case NoOpDiscoveryType, "": - return NOOPCatalog{}, nil - } - return nil, fmt.Errorf("no such catalog type available: %s", catalogConfig.Type) -} diff --git a/flytepropeller/pkg/controller/nodes/catalog/config_flags.go b/flytestdlib/catalog/config_flags.go similarity index 100% rename from flytepropeller/pkg/controller/nodes/catalog/config_flags.go rename to flytestdlib/catalog/config_flags.go diff --git a/flytepropeller/pkg/controller/nodes/catalog/config_flags_test.go b/flytestdlib/catalog/config_flags_test.go similarity index 100% rename from flytepropeller/pkg/controller/nodes/catalog/config_flags_test.go rename to flytestdlib/catalog/config_flags_test.go diff --git a/flytepropeller/pkg/controller/nodes/catalog/datacatalog/datacatalog.go b/flytestdlib/catalog/datacatalog/datacatalog.go similarity index 88% rename from flytepropeller/pkg/controller/nodes/catalog/datacatalog/datacatalog.go rename to flytestdlib/catalog/datacatalog/datacatalog.go index 6a029255a8..fe43a9620e 100644 --- a/flytepropeller/pkg/controller/nodes/catalog/datacatalog/datacatalog.go +++ b/flytestdlib/catalog/datacatalog/datacatalog.go @@ -395,10 +395,18 @@ func (m *CatalogClient) GetOrExtendReservation(ctx context.Context, key catalog. return nil, err } + return m.GetOrExtendReservationByArtifactTag(ctx, datasetID, tag, ownerID, heartbeatInterval) +} + +// GetOrExtendReservationByArtifactTag attempts to get a reservation for the cacheable task identified by the provided +// dataset ID and artifact tag, reserving it for the given owner ID. If you have previously acquired a reservation it +// will be extended. If another entity holds the reservation that is returned. +func (m *CatalogClient) GetOrExtendReservationByArtifactTag(ctx context.Context, datasetID *datacatalog.DatasetID, + artifactTag string, ownerID string, heartbeatInterval time.Duration) (*datacatalog.Reservation, error) { reservationQuery := &datacatalog.GetOrExtendReservationRequest{ ReservationId: &datacatalog.ReservationID{ DatasetId: datasetID, - TagName: tag, + TagName: artifactTag, }, OwnerId: ownerID, HeartbeatInterval: ptypes.DurationProto(heartbeatInterval), @@ -435,19 +443,79 @@ func (m *CatalogClient) ReleaseReservation(ctx context.Context, key catalog.Key, return err } + return m.ReleaseReservationByArtifactTag(ctx, datasetID, tag, ownerID) +} + +// ReleaseReservationByArtifactTag attempts to release a reservation by the given owner ID for a cacheable task +// identified by the provided dataset ID and artifact tag. If the reservation does not exist (e.x. it never existed or +// has been acquired by another owner) then this call still succeeds. +func (m *CatalogClient) ReleaseReservationByArtifactTag(ctx context.Context, datasetID *datacatalog.DatasetID, + artifactTag string, ownerID string) error { reservationQuery := &datacatalog.ReleaseReservationRequest{ ReservationId: &datacatalog.ReservationID{ DatasetId: datasetID, - TagName: tag, + TagName: artifactTag, }, OwnerId: ownerID, } - _, err = m.client.ReleaseReservation(ctx, reservationQuery) + if _, err := m.client.ReleaseReservation(ctx, reservationQuery); err != nil { + return err + } + + return nil +} + +func (m *CatalogClient) Delete(ctx context.Context, key catalog.Key) error { + datasetID, err := GenerateDatasetIDForTask(ctx, key) + if err != nil { + return err + } + + inputs := &core.LiteralMap{} + if key.TypedInterface.Inputs != nil { + retInputs, err := key.InputReader.Get(ctx) + if err != nil { + return errors.Wrap(err, "failed to read inputs when trying to query catalog") + } + inputs = retInputs + } + + tag, err := GenerateArtifactTagName(ctx, inputs, key.CacheIgnoreInputVars) if err != nil { return err } + return m.DeleteByArtifactTag(ctx, datasetID, tag) +} + +func (m *CatalogClient) DeleteByArtifactTag(ctx context.Context, datasetID *datacatalog.DatasetID, artifactTag string) error { + deleteQuery := &datacatalog.DeleteArtifactRequest{ + Dataset: datasetID, + QueryHandle: &datacatalog.DeleteArtifactRequest_TagName{ + TagName: artifactTag, + }, + } + + if _, err := m.client.DeleteArtifact(ctx, deleteQuery); err != nil { + return err + } + + return nil +} + +func (m *CatalogClient) DeleteByArtifactID(ctx context.Context, datasetID *datacatalog.DatasetID, artifactID string) error { + deleteQuery := &datacatalog.DeleteArtifactRequest{ + Dataset: datasetID, + QueryHandle: &datacatalog.DeleteArtifactRequest_ArtifactId{ + ArtifactId: artifactID, + }, + } + + if _, err := m.client.DeleteArtifact(ctx, deleteQuery); err != nil { + return err + } + return nil } diff --git a/flytepropeller/pkg/controller/nodes/catalog/datacatalog/datacatalog_test.go b/flytestdlib/catalog/datacatalog/datacatalog_test.go similarity index 79% rename from flytepropeller/pkg/controller/nodes/catalog/datacatalog/datacatalog_test.go rename to flytestdlib/catalog/datacatalog/datacatalog_test.go index ce8f6f4069..49d6ceb82f 100644 --- a/flytepropeller/pkg/controller/nodes/catalog/datacatalog/datacatalog_test.go +++ b/flytestdlib/catalog/datacatalog/datacatalog_test.go @@ -88,6 +88,10 @@ func assertGrpcErr(t *testing.T, err error, code codes.Code) { assert.Equal(t, code, status.Code(errors.Cause(err)), "Got err: %s", err) } +func assertNotFoundGrpcErr(t *testing.T, err error) { + assertGrpcErr(t, err, codes.NotFound) +} + func TestCatalog_Get(t *testing.T) { ctx := context.Background() @@ -117,7 +121,7 @@ func TestCatalog_Get(t *testing.T) { resp, err := catalogClient.Get(ctx, newKey) assert.Error(t, err) - assertGrpcErr(t, err, codes.NotFound) + assertNotFoundGrpcErr(t, err) assert.Equal(t, core.CatalogCacheStatus_CACHE_DISABLED, resp.GetStatus().GetCacheStatus()) }) @@ -973,6 +977,69 @@ func TestCatalog_GetOrExtendReservation(t *testing.T) { }) } +func TestCatalog_GetOrExtendReservationByArtifactTag(t *testing.T) { + ctx := context.Background() + + heartbeatInterval := time.Second * 5 + prevReservation := datacatalog.Reservation{ + ReservationId: &reservationID, + OwnerId: prevOwner, + } + + currentReservation := datacatalog.Reservation{ + ReservationId: &reservationID, + OwnerId: currentOwner, + } + + t.Run("CreateOrUpdateReservation", func(t *testing.T) { + ir := &mocks2.InputReader{} + ir.On("Get", mock.Anything).Return(sampleParameters, nil, nil) + + mockClient := &mocks.DataCatalogClient{} + catalogClient := &CatalogClient{ + client: mockClient, + } + + mockClient.On("GetOrExtendReservation", + ctx, + mock.MatchedBy(func(o *datacatalog.GetOrExtendReservationRequest) bool { + assert.EqualValues(t, datasetID.String(), o.ReservationId.DatasetId.String()) + assert.EqualValues(t, tagName, o.ReservationId.TagName) + return true + }), + ).Return(&datacatalog.GetOrExtendReservationResponse{Reservation: ¤tReservation}, nil, "") + + reservation, err := catalogClient.GetOrExtendReservationByArtifactTag(ctx, datasetID, tagName, currentOwner, heartbeatInterval) + + assert.NoError(t, err) + assert.Equal(t, reservation.OwnerId, currentOwner) + }) + + t.Run("ExistingReservation", func(t *testing.T) { + ir := &mocks2.InputReader{} + ir.On("Get", mock.Anything).Return(sampleParameters, nil, nil) + + mockClient := &mocks.DataCatalogClient{} + catalogClient := &CatalogClient{ + client: mockClient, + } + + mockClient.On("GetOrExtendReservation", + ctx, + mock.MatchedBy(func(o *datacatalog.GetOrExtendReservationRequest) bool { + assert.EqualValues(t, datasetID.String(), o.ReservationId.DatasetId.String()) + assert.EqualValues(t, tagName, o.ReservationId.TagName) + return true + }), + ).Return(&datacatalog.GetOrExtendReservationResponse{Reservation: &prevReservation}, nil, "") + + reservation, err := catalogClient.GetOrExtendReservationByArtifactTag(ctx, datasetID, tagName, currentOwner, heartbeatInterval) + + assert.NoError(t, err) + assert.Equal(t, reservation.OwnerId, prevOwner) + }) +} + func TestCatalog_ReleaseReservation(t *testing.T) { ctx := context.Background() @@ -1023,6 +1090,205 @@ func TestCatalog_ReleaseReservation(t *testing.T) { newKey.InputReader = ir err := catalogClient.ReleaseReservation(ctx, newKey, currentOwner) - assertGrpcErr(t, err, codes.NotFound) + assertNotFoundGrpcErr(t, err) + }) +} + +func TestCatalog_Delete(t *testing.T) { + ctx := context.Background() + + t.Run("Delete existing cached execution", func(t *testing.T) { + ir := &mocks2.InputReader{} + ir.On("Get", mock.Anything).Return(sampleParameters, nil, nil) + + mockClient := &mocks.DataCatalogClient{} + discovery := &CatalogClient{ + client: mockClient, + } + + mockClient.On("DeleteArtifact", + ctx, + mock.MatchedBy(func(o *datacatalog.DeleteArtifactRequest) bool { + assert.True(t, proto.Equal(o.Dataset, datasetID)) + assert.IsType(t, &datacatalog.DeleteArtifactRequest_TagName{}, o.QueryHandle) + assert.Equal(t, tagName, o.GetTagName()) + return true + }), + ).Return(&datacatalog.DeleteArtifactResponse{}, nil) + + newKey := sampleKey + newKey.InputReader = ir + err := discovery.Delete(ctx, newKey) + assert.NoError(t, err) + }) + + t.Run("Delete non-existing execution", func(t *testing.T) { + ir := &mocks2.InputReader{} + ir.On("Get", mock.Anything).Return(sampleParameters, nil, nil) + + mockClient := &mocks.DataCatalogClient{} + discovery := &CatalogClient{ + client: mockClient, + } + + deleteArtifactCalled := false + mockClient.On("DeleteArtifact", ctx, mock.Anything).Run(func(args mock.Arguments) { + deleteArtifactCalled = true + }).Return(nil, status.New(codes.NotFound, "missing entity of type Artifact with identifier id").Err()) + + newKey := sampleKey + newKey.InputReader = ir + err := discovery.Delete(ctx, newKey) + assert.Error(t, err) + assertNotFoundGrpcErr(t, err) + assert.True(t, deleteArtifactCalled) + }) + + t.Run("Error while deleting execution", func(t *testing.T) { + ir := &mocks2.InputReader{} + ir.On("Get", mock.Anything).Return(sampleParameters, nil, nil) + + mockClient := &mocks.DataCatalogClient{} + discovery := &CatalogClient{ + client: mockClient, + } + + genericErr := errors.New("generic error") + mockClient.On("DeleteArtifact", ctx, mock.Anything).Return(nil, genericErr) + + newKey := sampleKey + newKey.InputReader = ir + err := discovery.Delete(ctx, newKey) + assert.Error(t, err) + assert.Equal(t, genericErr, err) + }) +} + +func TestCatalog_DeleteByArtifactTag(t *testing.T) { + ctx := context.Background() + + t.Run("Delete existing cached execution", func(t *testing.T) { + ir := &mocks2.InputReader{} + ir.On("Get", mock.Anything).Return(sampleParameters, nil, nil) + + mockClient := &mocks.DataCatalogClient{} + discovery := &CatalogClient{ + client: mockClient, + } + + mockClient.On("DeleteArtifact", + ctx, + mock.MatchedBy(func(o *datacatalog.DeleteArtifactRequest) bool { + assert.True(t, proto.Equal(o.Dataset, datasetID)) + assert.IsType(t, &datacatalog.DeleteArtifactRequest_TagName{}, o.QueryHandle) + assert.Equal(t, tagName, o.GetTagName()) + return true + }), + ).Return(&datacatalog.DeleteArtifactResponse{}, nil) + + err := discovery.DeleteByArtifactTag(ctx, datasetID, tagName) + assert.NoError(t, err) + }) + + t.Run("Delete non-existing execution", func(t *testing.T) { + ir := &mocks2.InputReader{} + ir.On("Get", mock.Anything).Return(sampleParameters, nil, nil) + + mockClient := &mocks.DataCatalogClient{} + discovery := &CatalogClient{ + client: mockClient, + } + + deleteArtifactCalled := false + mockClient.On("DeleteArtifact", ctx, mock.Anything).Run(func(args mock.Arguments) { + deleteArtifactCalled = true + }).Return(nil, status.New(codes.NotFound, "missing entity of type Artifact with identifier id").Err()) + + err := discovery.DeleteByArtifactTag(ctx, datasetID, tagName) + assert.Error(t, err) + assertNotFoundGrpcErr(t, err) + assert.True(t, deleteArtifactCalled) + }) + + t.Run("Error while deleting execution", func(t *testing.T) { + ir := &mocks2.InputReader{} + ir.On("Get", mock.Anything).Return(sampleParameters, nil, nil) + + mockClient := &mocks.DataCatalogClient{} + discovery := &CatalogClient{ + client: mockClient, + } + + genericErr := errors.New("generic error") + mockClient.On("DeleteArtifact", ctx, mock.Anything).Return(nil, genericErr) + + err := discovery.DeleteByArtifactTag(ctx, datasetID, tagName) + assert.Error(t, err) + assert.Equal(t, genericErr, err) + }) +} + +func TestCatalog_DeleteByArtifactID(t *testing.T) { + ctx := context.Background() + artifactID := "ff611b8e-f0fa-4f91-a9da-9fa43d619c84" + + t.Run("Delete existing cached execution", func(t *testing.T) { + ir := &mocks2.InputReader{} + ir.On("Get", mock.Anything).Return(sampleParameters, nil, nil) + + mockClient := &mocks.DataCatalogClient{} + discovery := &CatalogClient{ + client: mockClient, + } + + mockClient.On("DeleteArtifact", + ctx, + mock.MatchedBy(func(o *datacatalog.DeleteArtifactRequest) bool { + assert.True(t, proto.Equal(o.Dataset, datasetID)) + assert.IsType(t, &datacatalog.DeleteArtifactRequest_ArtifactId{}, o.QueryHandle) + assert.Equal(t, artifactID, o.GetArtifactId()) + return true + }), + ).Return(&datacatalog.DeleteArtifactResponse{}, nil) + + err := discovery.DeleteByArtifactID(ctx, datasetID, artifactID) + assert.NoError(t, err) + }) + + t.Run("Delete non-existing execution", func(t *testing.T) { + ir := &mocks2.InputReader{} + ir.On("Get", mock.Anything).Return(sampleParameters, nil, nil) + + mockClient := &mocks.DataCatalogClient{} + discovery := &CatalogClient{ + client: mockClient, + } + + deleteArtifactCalled := false + mockClient.On("DeleteArtifact", ctx, mock.Anything).Run(func(args mock.Arguments) { + deleteArtifactCalled = true + }).Return(nil, status.New(codes.NotFound, "missing entity of type Artifact with identifier id").Err()) + + err := discovery.DeleteByArtifactID(ctx, datasetID, artifactID) + assert.Error(t, err) + assertNotFoundGrpcErr(t, err) + assert.True(t, deleteArtifactCalled) + }) + + t.Run("Error while deleting execution", func(t *testing.T) { + ir := &mocks2.InputReader{} + ir.On("Get", mock.Anything).Return(sampleParameters, nil, nil) + + mockClient := &mocks.DataCatalogClient{} + discovery := &CatalogClient{ + client: mockClient, + } + + genericErr := errors.New("generic error") + mockClient.On("DeleteArtifact", ctx, mock.Anything).Return(nil, genericErr) + + err := discovery.DeleteByArtifactID(ctx, datasetID, artifactID) + assert.Error(t, err) + assert.Equal(t, genericErr, err) }) } diff --git a/flytepropeller/pkg/controller/nodes/catalog/datacatalog/transformer.go b/flytestdlib/catalog/datacatalog/transformer.go similarity index 91% rename from flytepropeller/pkg/controller/nodes/catalog/datacatalog/transformer.go rename to flytestdlib/catalog/datacatalog/transformer.go index 5c0ac0c30b..0e3d23e58a 100644 --- a/flytepropeller/pkg/controller/nodes/catalog/datacatalog/transformer.go +++ b/flytestdlib/catalog/datacatalog/transformer.go @@ -29,7 +29,7 @@ func getDatasetNameFromTask(taskID core.Identifier) string { return fmt.Sprintf("%s-%s", taskNamespace, taskID.Name) } -// Transform the artifact Data into task execution outputs as a literal map +// GenerateTaskOutputsFromArtifact transforms the artifact Data into task execution outputs as a literal map func GenerateTaskOutputsFromArtifact(id core.Identifier, taskInterface core.TypedInterface, artifact *datacatalog.Artifact) (*core.LiteralMap, error) { // if there are no outputs in the task, return empty map @@ -124,9 +124,9 @@ func GenerateArtifactTagName(ctx context.Context, inputs *core.LiteralMap, cache return tag, nil } -// Get the DataSetID for a task. +// GenerateDatasetIDForTask returns the DataSetID for a task. // NOTE: the version of the task is a combination of both the discoverable_version and the task signature. -// This is because the interface may of changed even if the discoverable_version hadn't. +// This is because the interface may have changed even if the discoverable_version hadn't. func GenerateDatasetIDForTask(ctx context.Context, k catalog.Key) (*datacatalog.DatasetID, error) { datasetVersion, err := generateDataSetVersionFromTask(ctx, k.TypedInterface, k.CacheVersion) if err != nil { @@ -149,6 +149,18 @@ func DatasetIDToIdentifier(id *datacatalog.DatasetID) *core.Identifier { return &core.Identifier{ResourceType: core.ResourceType_DATASET, Name: id.Name, Project: id.Project, Domain: id.Domain, Version: id.Version} } +func IdentifierToDatasetID(identifier *core.Identifier) *datacatalog.DatasetID { + if identifier == nil { + return nil + } + return &datacatalog.DatasetID{ + Project: identifier.Project, + Name: identifier.Name, + Domain: identifier.Domain, + Version: identifier.Version, + } +} + // With Node-Node relationship this is bound to change. So lets keep it extensible const ( taskVersionKey = "task-version" @@ -159,6 +171,7 @@ const ( execTaskAttemptKey = "exec-attempt" ) +// GetDatasetMetadataForSource returns the dataset metadata for the given task execution. // Understanding Catalog Identifiers // DatasetID represents the ID of the dataset. For Flyte this represents the ID of the generating task and the version calculated as the hash of the interface & cache version. refer to `GenerateDatasetIDForTask` // TaskID is the same as the DatasetID + name: (DataSetID - namespace) + task version which is stored in the metadata @@ -229,7 +242,7 @@ func GetSourceFromMetadata(datasetMd, artifactMd *datacatalog.Metadata, currentI }, nil } -// Given the Catalog Information (returned from a Catalog call), returns the CatalogMetadata that is populated in the event. +// EventCatalogMetadata returns the CatalogMetadata that is populated in the event, given the Catalog Information (returned from a Catalog call). func EventCatalogMetadata(datasetID *datacatalog.DatasetID, tag *datacatalog.Tag, sourceID *core.TaskExecutionIdentifier) *core.CatalogMetadata { md := &core.CatalogMetadata{ DatasetId: DatasetIDToIdentifier(datasetID), @@ -251,7 +264,7 @@ func EventCatalogMetadata(datasetID *datacatalog.DatasetID, tag *datacatalog.Tag return md } -// Returns a default value, if the given key is not found in the map, else returns the value in the map +// GetOrDefault returns a default value, if the given key is not found in the map, else returns the value in the map func GetOrDefault(m map[string]string, key, defaultValue string) string { v, ok := m[key] if !ok { diff --git a/flytepropeller/pkg/controller/nodes/catalog/datacatalog/transformer_test.go b/flytestdlib/catalog/datacatalog/transformer_test.go similarity index 100% rename from flytepropeller/pkg/controller/nodes/catalog/datacatalog/transformer_test.go rename to flytestdlib/catalog/datacatalog/transformer_test.go diff --git a/flytepropeller/pkg/controller/nodes/catalog/noop_catalog.go b/flytestdlib/catalog/noop_catalog.go similarity index 64% rename from flytepropeller/pkg/controller/nodes/catalog/noop_catalog.go rename to flytestdlib/catalog/noop_catalog.go index eb93026242..1af530be6c 100644 --- a/flytepropeller/pkg/controller/nodes/catalog/noop_catalog.go +++ b/flytestdlib/catalog/noop_catalog.go @@ -35,6 +35,26 @@ func (n NOOPCatalog) GetOrExtendReservation(_ context.Context, _ catalog.Key, _ return nil, nil } +func (n NOOPCatalog) GetOrExtendReservationByArtifactTag(_ context.Context, _ *datacatalog.DatasetID, _ string, _ string, _ time.Duration) (*datacatalog.Reservation, error) { + return nil, nil +} + func (n NOOPCatalog) ReleaseReservation(_ context.Context, _ catalog.Key, _ string) error { return nil } + +func (n NOOPCatalog) ReleaseReservationByArtifactTag(_ context.Context, _ *datacatalog.DatasetID, _ string, _ string) error { + return nil +} + +func (n NOOPCatalog) Delete(_ context.Context, _ catalog.Key) error { + return nil +} + +func (n NOOPCatalog) DeleteByArtifactTag(_ context.Context, _ *datacatalog.DatasetID, _ string) error { + return nil +} + +func (n NOOPCatalog) DeleteByArtifactID(_ context.Context, _ *datacatalog.DatasetID, _ string) error { + return nil +} diff --git a/flytestdlib/go.mod b/flytestdlib/go.mod index d275261dc8..821a52f6ea 100644 --- a/flytestdlib/go.mod +++ b/flytestdlib/go.mod @@ -9,12 +9,18 @@ require ( github.com/ernesto-jimenez/gogen v0.0.0-20180125220232-d7d4131e6607 github.com/fatih/color v1.13.0 github.com/fatih/structtag v1.2.0 + github.com/flyteorg/flyte/flyteidl v0.0.0-00010101000000-000000000000 + github.com/flyteorg/flyte/flyteplugins v0.0.0-00010101000000-000000000000 + github.com/flyteorg/flyte/flytepropeller v0.0.0-00010101000000-000000000000 github.com/flyteorg/stow v0.3.10 github.com/fsnotify/fsnotify v1.6.0 github.com/ghodss/yaml v1.0.0 github.com/go-gormigrate/gormigrate/v2 v2.1.1 github.com/go-test/deep v1.0.7 github.com/golang/protobuf v1.5.3 + github.com/google/uuid v1.3.1 + github.com/grpc-ecosystem/go-grpc-middleware v1.3.0 + github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0 github.com/hashicorp/golang-lru v0.5.4 github.com/jackc/pgconn v1.14.1 github.com/jackc/pgx/v5 v5.4.3 @@ -22,28 +28,29 @@ require ( github.com/mitchellh/mapstructure v1.5.0 github.com/pkg/errors v0.9.1 github.com/prometheus/client_golang v1.16.0 - github.com/sirupsen/logrus v1.7.0 + github.com/sirupsen/logrus v1.9.3 github.com/spf13/cobra v1.7.0 github.com/spf13/pflag v1.0.5 github.com/spf13/viper v1.11.0 github.com/stretchr/testify v1.8.4 + go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.35.0 go.opentelemetry.io/otel v1.19.0 go.opentelemetry.io/otel/exporters/jaeger v1.17.0 go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.19.0 go.opentelemetry.io/otel/sdk v1.19.0 go.opentelemetry.io/otel/trace v1.19.0 golang.org/x/time v0.3.0 - golang.org/x/tools v0.9.3 + golang.org/x/tools v0.13.0 google.golang.org/grpc v1.56.1 google.golang.org/protobuf v1.30.0 gorm.io/driver/postgres v1.5.3 gorm.io/driver/sqlite v1.5.4 gorm.io/gorm v1.25.4 gotest.tools v2.2.0+incompatible - k8s.io/api v0.28.2 - k8s.io/apimachinery v0.28.2 - k8s.io/client-go v0.28.1 - sigs.k8s.io/controller-runtime v0.0.0-00010101000000-000000000000 + k8s.io/api v0.28.3 + k8s.io/apimachinery v0.28.3 + k8s.io/client-go v0.28.3 + sigs.k8s.io/controller-runtime v0.16.3 ) require ( @@ -51,7 +58,7 @@ require ( cloud.google.com/go/compute v1.19.1 // indirect cloud.google.com/go/compute/metadata v0.2.3 // indirect cloud.google.com/go/iam v0.13.0 // indirect - cloud.google.com/go/storage v1.28.1 // indirect + cloud.google.com/go/storage v1.29.0 // indirect github.com/Azure/azure-sdk-for-go/sdk/azcore v1.7.2 // indirect github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.3.1 // indirect github.com/Azure/azure-sdk-for-go/sdk/internal v1.3.0 // indirect @@ -61,7 +68,7 @@ require ( github.com/cespare/xxhash v1.1.0 // indirect github.com/cespare/xxhash/v2 v2.2.0 // indirect github.com/davecgh/go-spew v1.1.1 // indirect - github.com/emicklei/go-restful/v3 v3.9.0 // indirect + github.com/emicklei/go-restful/v3 v3.11.0 // indirect github.com/evanphx/json-patch v5.6.0+incompatible // indirect github.com/evanphx/json-patch/v5 v5.6.0 // indirect github.com/go-logr/logr v1.2.4 // indirect @@ -75,7 +82,6 @@ require ( github.com/google/gnostic-models v0.6.8 // indirect github.com/google/go-cmp v0.5.9 // indirect github.com/google/gofuzz v1.2.0 // indirect - github.com/google/uuid v1.3.1 // indirect github.com/googleapis/enterprise-certificate-proxy v0.2.3 // indirect github.com/googleapis/gax-go/v2 v2.7.1 // indirect github.com/hashicorp/hcl v1.0.0 // indirect @@ -93,7 +99,7 @@ require ( github.com/kylelemons/godebug v1.1.0 // indirect github.com/mailru/easyjson v0.7.7 // indirect github.com/mattn/go-colorable v0.1.12 // indirect - github.com/mattn/go-isatty v0.0.14 // indirect + github.com/mattn/go-isatty v0.0.16 // indirect github.com/mattn/go-sqlite3 v1.14.17 // indirect github.com/matttproud/golang_protobuf_extensions v1.0.4 // indirect github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect @@ -115,13 +121,13 @@ require ( github.com/subosito/gotenv v1.2.0 // indirect go.opencensus.io v0.24.0 // indirect go.opentelemetry.io/otel/metric v1.19.0 // indirect - golang.org/x/crypto v0.13.0 // indirect - golang.org/x/exp v0.0.0-20220722155223-a9213eeb770e // indirect - golang.org/x/mod v0.10.0 // indirect - golang.org/x/net v0.15.0 // indirect + golang.org/x/crypto v0.14.0 // indirect + golang.org/x/exp v0.0.0-20231005195138-3e424a577f31 // indirect + golang.org/x/mod v0.12.0 // indirect + golang.org/x/net v0.17.0 // indirect golang.org/x/oauth2 v0.8.0 // indirect - golang.org/x/sys v0.12.0 // indirect - golang.org/x/term v0.12.0 // indirect + golang.org/x/sys v0.13.0 // indirect + golang.org/x/term v0.13.0 // indirect golang.org/x/text v0.13.0 // indirect golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2 // indirect google.golang.org/api v0.114.0 // indirect @@ -144,6 +150,7 @@ require ( replace ( github.com/flyteorg/flyte/datacatalog => ../datacatalog github.com/flyteorg/flyte/flyteadmin => ../flyteadmin + github.com/flyteorg/flyte/flyteidl => ../flyteidl github.com/flyteorg/flyte/flyteplugins => ../flyteplugins github.com/flyteorg/flyte/flytepropeller => ../flytepropeller github.com/flyteorg/flyte/flytestdlib => ../flytestdlib diff --git a/flytestdlib/go.sum b/flytestdlib/go.sum index ee195ca9fc..5d95be424b 100644 --- a/flytestdlib/go.sum +++ b/flytestdlib/go.sum @@ -45,8 +45,8 @@ cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohl cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs= cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0= cloud.google.com/go/storage v1.14.0/go.mod h1:GrKmX003DSIwi9o29oFT7YDnHYwZoctc3fOKtUw0Xmo= -cloud.google.com/go/storage v1.28.1 h1:F5QDG5ChchaAVQhINh24U99OWHURqrW8OmQcGKXcbgI= -cloud.google.com/go/storage v1.28.1/go.mod h1:Qnisd4CqDdo6BGs2AD5LLnEsmSQ80wQ5ogcBBKhU86Y= +cloud.google.com/go/storage v1.29.0 h1:6weCgzRvMg7lzuUurI4697AqIRPU1SvzHhynwpW31jI= +cloud.google.com/go/storage v1.29.0/go.mod h1:4puEjyTKnku6gfKoTfNOU/W+a9JyuVNxjpS5GBrB8h4= dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= github.com/Azure/azure-sdk-for-go/sdk/azcore v1.7.2 h1:t5+QXLCK9SVi0PPdaY0PrFvYUo24KwA0QwxnaHRSVd4= github.com/Azure/azure-sdk-for-go/sdk/azcore v1.7.2/go.mod h1:bjGvMhVMb+EEm3VRNQawDMUyMMjo+S5ewNjflkep/0Q= @@ -84,6 +84,8 @@ github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDk github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= github.com/cncf/udpa/go v0.0.0-20200629203442-efcf912fb354/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= +github.com/cncf/xds/go v0.0.0-20230607035331-e9ce68804cb4 h1:/inchEIKaYC1Akx+H+gqO04wryn5h75LSazbRlnya1k= +github.com/cncf/xds/go v0.0.0-20230607035331-e9ce68804cb4/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cockroachdb/apd v1.1.0/go.mod h1:8Sl8LxpKi29FqWXR16WEFZRNSz3SoPzUzeMeY4+DwBQ= github.com/coocood/freecache v1.1.1 h1:uukNF7QKCZEdZ9gAV7WQzvh0SbjwdMF6m3x3rxEkaPc= github.com/coocood/freecache v1.1.1/go.mod h1:OKrEjkGVoxZhyWAJoeFi5BMLUJm2Tit0kpGkIr7NGYY= @@ -97,14 +99,16 @@ 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/emicklei/go-restful/v3 v3.9.0 h1:XwGDlfxEnQZzuopoqxwSEllNcCOM9DhhFyhFIIGKwxE= -github.com/emicklei/go-restful/v3 v3.9.0/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRry+4bhvbpWn3mrbc= +github.com/emicklei/go-restful/v3 v3.11.0 h1:rAQeMHw1c7zTmncogyy8VvRZwtkmkZ4FxERmMY4rD+g= +github.com/emicklei/go-restful/v3 v3.11.0/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRry+4bhvbpWn3mrbc= github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= github.com/envoyproxy/go-control-plane v0.9.7/go.mod h1:cwu0lG7PUMfa9snN8LXBig5ynNVH9qI8YYLbd1fK2po= github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= +github.com/envoyproxy/protoc-gen-validate v0.10.1 h1:c0g45+xCJhdgFGw7a5QAfdS4byAbud7miNWJ1WwEVf8= +github.com/envoyproxy/protoc-gen-validate v0.10.1/go.mod h1:DRjgyB0I43LtJapqN6NiRwroiAU2PaFuvk/vjgh61ss= github.com/ernesto-jimenez/gogen v0.0.0-20180125220232-d7d4131e6607 h1:cTavhURetDkezJCvxFggiyLeP40Mrk/TtVg2+ycw1Es= github.com/ernesto-jimenez/gogen v0.0.0-20180125220232-d7d4131e6607/go.mod h1:Cg4fM0vhYWOZdgM7RIOSTRNIc8/VT7CXClC3Ni86lu4= github.com/evanphx/json-patch v5.6.0+incompatible h1:jBYDEEiFBPxA0v50tFdvOzQQTCvpL6mnFh5mB2/l16U= @@ -126,6 +130,8 @@ github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2 github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= github.com/go-gormigrate/gormigrate/v2 v2.1.1 h1:eGS0WTFRV30r103lU8JNXY27KbviRnqqIDobW3EV3iY= github.com/go-gormigrate/gormigrate/v2 v2.1.1/go.mod h1:L7nJ620PFDKei9QOhJzqA8kRCk+E3UbV2f5gv+1ndLc= +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 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.2.4 h1:g01GSCwiDw2xSZfjJ2/T9M+S6pFdcNtFYsp+Y43HYDQ= @@ -228,6 +234,10 @@ github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5m github.com/googleapis/gax-go/v2 v2.7.1 h1:gF4c0zjUP2H/s/hEGyLA3I0fA2ZWjzYiONAD6cvPr8A= github.com/googleapis/gax-go/v2 v2.7.1/go.mod h1:4orTrqY6hXxxaUL4LHIPl6lGo8vAE38/qKbhSAKP6QI= github.com/googleapis/google-cloud-go-testing v0.0.0-20200911160855-bcd43fbb19e8/go.mod h1:dvDLG8qkwmyD9a/MJJN3XJcT3xFxOKAvTZGvuZmac9g= +github.com/grpc-ecosystem/go-grpc-middleware v1.3.0 h1:+9834+KizmvFV7pXQGSXQTsaWhq2GjuNUt0aUU0YBYw= +github.com/grpc-ecosystem/go-grpc-middleware v1.3.0/go.mod h1:z0ButlSOZa5vEBq9m2m2hlwIgKw+rp3sdCBRoJY+30Y= +github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0 h1:Ovs26xHkKqVztRpIrF/92BcuyuQ/YW4NSIpoGtfXNho= +github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk= github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/hashicorp/golang-lru v0.5.4 h1:YDjusn29QI/Das2iO9M0BHnIbxPeyuCHsjMW+lJfyTc= @@ -236,8 +246,8 @@ github.com/hashicorp/hcl v1.0.0 h1:0Anlzjpi4vEasTeNFn2mLJgTSwt0+6sfsiTG8qcWGx4= github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= -github.com/imdario/mergo v0.3.6 h1:xTNEAn+kxVO7dTZGu0CegyqKZmoWFI0rF8UxjlB2d28= -github.com/imdario/mergo v0.3.6/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA= +github.com/imdario/mergo v0.3.13 h1:lFzP57bqS/wsqKssCGmtLAb8A0wKjLGrve2q3PPVcBk= +github.com/imdario/mergo v0.3.13/go.mod h1:4lJ1jqUDcsbIECGy0RUJAXNIhg+6ocWgb1ALK2O4oXg= github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8= github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw= github.com/jackc/chunkreader v1.0.0/go.mod h1:RT6O25fNZIuasFJRyZ4R/Y2BbhasbmZXF9QQ7T3kePo= @@ -301,6 +311,7 @@ github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+o github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/konsorten/go-windows-terminal-sequences v1.0.2/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= 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.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= @@ -326,8 +337,9 @@ github.com/mattn/go-colorable v0.1.12/go.mod h1:u5H1YNBxpqRaxsYJYSkiCWKzEfiAb1Gb github.com/mattn/go-isatty v0.0.5/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= github.com/mattn/go-isatty v0.0.7/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= -github.com/mattn/go-isatty v0.0.14 h1:yVuAays6BHfxijgZPzw+3Zlu5yQgKGP2/hcQbHb7S9Y= github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94= +github.com/mattn/go-isatty v0.0.16 h1:bq3VjFmv/sOjHtdEhmkEV4x1AJtvUvOJ2PFAZ5+peKQ= +github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= github.com/mattn/go-sqlite3 v1.14.17 h1:mCRHCLDUBXgpKAqIKsaAaAsrAlbkeomtRFKXh2L6YIM= github.com/mattn/go-sqlite3 v1.14.17/go.mod h1:2eHXhiwb8IkHr+BDWZGa96P6+rkvnG63S2DGjv9HUNg= github.com/matttproud/golang_protobuf_extensions v1.0.4 h1:mmDVorXM7PCGKw94cs5zkfA9PSy5pEvNWRP0ET0TIVo= @@ -347,6 +359,7 @@ 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.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= github.com/pelletier/go-toml v1.9.4 h1:tjENF6MfZAg8e4ZmZTeWaWiT2vXtsoO6+iuOjFhECwM= github.com/pelletier/go-toml v1.9.4/go.mod h1:u1nR/EPcESfeI/szUZKdtJ0xRNbUoANCkoOuaOx1Y+c= github.com/pelletier/go-toml/v2 v2.0.0-beta.8 h1:dy81yyLYJDwMTifq24Oi/IslOslRrDSb3jwDggjz3Z0= @@ -379,8 +392,8 @@ github.com/satori/go.uuid v1.2.0/go.mod h1:dA0hQrYB0VpLJoorglMZABFdXlWrHn1NEOzdh github.com/shopspring/decimal v0.0.0-20180709203117-cd690d0c9e24/go.mod h1:M+9NzErvs504Cn4c5DxATwIqPbtswREoFCre64PpcG4= github.com/sirupsen/logrus v1.4.1/go.mod h1:ni0Sbl8bgC9z8RoU9G6nDWqqs/fq4eDPysMBDgk/93Q= github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= -github.com/sirupsen/logrus v1.7.0 h1:ShrD1U9pZB12TX0cVy0DtePoCH97K8EtX+mg7ZARUtM= -github.com/sirupsen/logrus v1.7.0/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= +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.9.2 h1:j49Hj62F0n+DaZ1dDCvhABaPNSGNkt32oRFxI33IEMw= @@ -427,6 +440,8 @@ go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk= go.opencensus.io v0.24.0 h1:y73uSU6J157QMP2kn2r30vwW1A2W2WFwSCGnAVxeaD0= go.opencensus.io v0.24.0/go.mod h1:vNK8G9p7aAivkbmorf4v+7Hgx+Zs0yY+0fOtgBfjQKo= +go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.35.0 h1:xFSRQBbXF6VvYRf2lqMJXxoB72XI1K/azav8TekHHSw= +go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.35.0/go.mod h1:h8TWwRAhQpOd0aM5nYsRD8+flnkj+526GEIVlarH7eY= go.opentelemetry.io/otel v1.19.0 h1:MuS/TNf4/j4IXsZuJegVzI1cwut7Qc00344rgH7p8bs= go.opentelemetry.io/otel v1.19.0/go.mod h1:i0QyjOq3UPoTzff0PJB2N66fb4S0+rSbSB15/oyH9fY= go.opentelemetry.io/otel/exporters/jaeger v1.17.0 h1:D7UpUy2Xc2wsi1Ras6V40q806WM07rqoCWzXu7Sqy+4= @@ -462,8 +477,8 @@ golang.org/x/crypto v0.0.0-20210711020723-a769d52b0f97/go.mod h1:GvvjBRRGRdwPK5y golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20211108221036-ceb1ce70b4fa/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.6.0/go.mod h1:OFC/31mSvZgRz0V1QTNCzfAI1aIRzbiufJtkMIlEp58= -golang.org/x/crypto v0.13.0 h1:mvySKfSWJ+UKUii46M40LOvyWfN0s2U+46/jDd0e6Ck= -golang.org/x/crypto v0.13.0/go.mod h1:y6Z2r+Rw4iayiXXAIxJIDAJ1zMW4yaTpebo8fPOliYc= +golang.org/x/crypto v0.14.0 h1:wBqGXzWJW6m1XrIKlAH0Hs1JJ7+9KBwnIO8v66Q9cHc= +golang.org/x/crypto v0.14.0/go.mod h1:MVFd36DqK4CsrnJYDkBA3VC4m2GkXAM0PvzMCn4JQf4= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= @@ -474,8 +489,8 @@ golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u0 golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM= golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU= -golang.org/x/exp v0.0.0-20220722155223-a9213eeb770e h1:+WEEuIdZHnUeJJmEUjyYC2gfUMj69yZXw17EnHg/otA= -golang.org/x/exp v0.0.0-20220722155223-a9213eeb770e/go.mod h1:Kr81I6Kryrl9sr8s2FK3vxD90NdsKWRuOIl2O4CvYbA= +golang.org/x/exp v0.0.0-20231005195138-3e424a577f31 h1:9k5exFQKQglLo+RoP+4zMjOFE14P6+vyR0baDAi0Rcs= +golang.org/x/exp v0.0.0-20231005195138-3e424a577f31/go.mod h1:S2oDrQGGwySpoQPVqRShND87VCbxmc6bL1Yd2oYrm6k= golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= @@ -500,8 +515,8 @@ 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.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= -golang.org/x/mod v0.10.0 h1:lFO9qtOdlre5W1jxS3r/4szv2/6iXxScdzjoBMXNhYk= -golang.org/x/mod v0.10.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= +golang.org/x/mod v0.12.0 h1:rmsUpXtvNzj340zd98LZ4KntptpfRHwpFOHG188oHXc= +golang.org/x/mod v0.12.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= 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-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -538,8 +553,8 @@ golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= -golang.org/x/net v0.15.0 h1:ugBLEUaxABaB5AJqW9enI0ACdci2RUd4eP51NTBvuJ8= -golang.org/x/net v0.15.0/go.mod h1:idbUs1IY1+zTqbi8yxTbhexhEEk5ur9LInksu6HrEpk= +golang.org/x/net v0.17.0 h1:pVaXccu2ozPjCXewfr1S7xza/zcXTity9cCdXQYSjIM= +golang.org/x/net v0.17.0/go.mod h1:NxSsAGuq816PNPmqtQdLE42eU2Fs7NoRIZrHJAlaCOE= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -562,8 +577,8 @@ golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJ 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-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.2.0 h1:PUR+T4wwASmuSTYdKjYHI5TD22Wy5ogLU5qZCOLxBrI= -golang.org/x/sync v0.2.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.3.0 h1:ftCYgMx6zT/asHUrPw8BLLscYtGznsLAnjq5RH9P66E= +golang.org/x/sync v0.3.0/go.mod h1:FU7BRWz2tNW+3quACPkgCx/L+uEAv1htQ0V83Z9Rj+Y= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -610,17 +625,19 @@ golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6/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-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.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.12.0 h1:CM0HF96J0hcLAwsHPJZjfdNzs0gftsLfgKt57wWHJ0o= -golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.13.0 h1:Af8nKPmuFypiUBjVoU9V20FiaFXOcuZI21p0ycVYYGE= +golang.org/x/sys v0.13.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw= 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.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k= -golang.org/x/term v0.12.0 h1:/ZfYdc3zq+q02Rv9vGqTeSItdzZTSNDmfTi0mBAuidU= -golang.org/x/term v0.12.0/go.mod h1:owVbMEjm3cBLCHdkQu9b1opXd4ETQWc3BhuQGKgXgvU= +golang.org/x/term v0.13.0 h1:bb+I9cTfFazGW51MZqBVmZy7+JEJMouUHTUSKVQLBek= +golang.org/x/term v0.13.0/go.mod h1:LTmsnFJwVN6bCy1rVCoS+qHT1HhALEFxKncY3WNNh4U= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -689,8 +706,8 @@ golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4f 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.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= -golang.org/x/tools v0.9.3 h1:Gn1I8+64MsuTb/HpH+LmQtNas23LhUVr3rYZ0eKuaMM= -golang.org/x/tools v0.9.3/go.mod h1:owI94Op576fPu3cIGQeHs3joujW/2Oc6MtlxbF5dfNc= +golang.org/x/tools v0.13.0 h1:Iey4qkscZuv0VvIt8E0neZjtPVQFSc870HQ448QgEmQ= +golang.org/x/tools v0.13.0/go.mod h1:HvlwmtVNQAhOuCjW7xxvovg8wbNq7LwfXh/k7wXUl58= golang.org/x/xerrors v0.0.0-20190410155217-1f06c39b4373/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20190513163551-3ee3066db522/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= @@ -751,6 +768,7 @@ google.golang.org/genproto v0.0.0-20200228133532-8c2c7df3a383/go.mod h1:55QSHmfG google.golang.org/genproto v0.0.0-20200305110556-506484158171/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200312145019-da6875a35672/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200331122359-1ee6d9798940/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200423170343-7949de9c1215/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200430143042-b979b6f78d84/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200511104702-f5ebc3bea380/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200515170657-fc4c6c6a6587/go.mod h1:YsZOwe1myG/8QRHRsmBRE1LrgQY60beZKjly0O1fX9U=